@copilotkit/react-core 1.62.2-canary.1783457132 → 1.62.3

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/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-Ces-OkSR.cjs');
4
+ const require_copilotkit = require('../copilotkit-5MptLWNR.cjs');
5
5
  require("./index.css");
6
6
  let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
7
7
 
@@ -1,4 +1,4 @@
1
- import { $ as useComponent, $t as CopilotChatProps, A as useAttachments, An as CopilotChatLabels, At as CopilotChatAttachmentQueue, B as UseInterruptConfig, Bt as CopilotSidebar, C as NewMemory, Cn as CopilotChatToolCallsViewProps, Ct as CopilotKitInspector, D as useLearningContainers, Dn as CopilotChatConfigurationProvider, Dt as AttachmentModality, E as UseLearningContainersArgs, En as ToolsMenuItem, Et as Attachment, F as LearnFromUserActionResult, Ft as UseThreadsInput, G as JsonSerializable, Gt as CopilotSidebarViewProps, H as useConfigureSuggestions, Ht as CopilotPopupView, I as UseLearnFromUserActionRecorder, It as UseThreadsResult, J as UseAgentUpdate, Jt as CopilotChatToggleButton, K as useAgentContext, Kt as CopilotModalHeader, L as useLearnFromUserAction, Lt as useThreads, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as AudioRecorderError, Mt as CopilotThreadsDrawerProps, N as useLearnFromUserActionInCurrentThread, Nn as AudioRecorderState, Nt as CopilotThreadsDrawerRowRenderer, O as UseAttachmentsProps, On as CopilotChatConfigurationProviderProps, Ot as AttachmentsConfig, P as LearnFromUserActionInput, Pn as CopilotChatAudioRecorder, Pt as Thread, Q as useRenderTool, Qt as CopilotChat, R as UseMemoriesResult, Rt as CopilotPopup, S as MemoryScope, Sn as CopilotChatToolCallsView, St as MCPAppsActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatInputProps, Tt as WildcardToolCallRender, U as useSuggestions, Ut as CopilotPopupViewProps, V as useInterrupt, Vt as CopilotSidebarProps, W as AgentContextInput, Wt as CopilotSidebarView, X as useHumanInTheLoop, Xt as DefaultCloseIcon, Y as useAgent, Yt as CopilotChatToggleButtonProps, Z as useDefaultRenderTool, Zt as DefaultOpenIcon, _ as CopilotKitCoreReactConfig, _n as CopilotChatReasoningMessageProps, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as INTELLIGENCE_TURN_HEAD, at as InterruptEvent, b as MemoryChanges, bn as CopilotChatAssistantMessage, bt as MCPAppsActivityContentSchema, c as InspectorAnchor, cn as getIntelligenceTurnAnchors, ct as InterruptResolveFn, d as CopilotKitProvider, dn as IntelligenceIndicatorViewProps, dt as ReactHumanInTheLoop, en as CopilotChatView, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatSuggestionView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as CopilotChatReasoningMessage, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as CopilotChatSuggestionPillProps, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatMessageViewProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as useCopilotChatConfiguration, jt as CopilotThreadsDrawer, k as UseAttachmentsReturn, kn as CopilotChatConfigurationValue, kt as CopilotChatAttachmentRenderer, l as SandboxFunctionsContext, ln as IntelligenceIndicatorStatus, lt as ResumeEntry, m as CopilotKitContextValue, mn as CopilotChatSuggestionPill, mt as ReactToolCallRenderer, nn as AutoScrollMode, nt as SandboxFunction, o as A2UIUserAction, on as IntelligenceIndicator, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatSuggestionViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotModalHeaderProps, r as CopilotKitProps, rn as CopilotChatMessageView, rt as Interrupt, s as createA2UIMessageRenderer, sn as IntelligenceIndicatorProps, st as InterruptRenderProps, t as CopilotKit, tn as CopilotChatViewProps, tt as useRenderActivityMessage, u as useSandboxFunctions, un as IntelligenceIndicatorView, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as CopilotChatUserMessage, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatInput, wt as CopilotKitInspectorProps, x as MemoryKind, xn as CopilotChatAssistantMessageProps, xt as MCPAppsActivityRenderer, y as Memory, yn as CopilotChatUserMessageProps, yt as MCPAppsActivityContent, z as useMemories, zt as CopilotPopupProps } from "../copilotkit-BnaWY11A.cjs";
1
+ import { $ as useComponent, $t as CopilotChatProps, A as useAttachments, An as CopilotChatLabels, At as CopilotChatAttachmentQueue, B as UseInterruptConfig, Bt as CopilotSidebar, C as NewMemory, Cn as CopilotChatToolCallsViewProps, Ct as CopilotKitInspector, D as useLearningContainers, Dn as CopilotChatConfigurationProvider, Dt as AttachmentModality, E as UseLearningContainersArgs, En as ToolsMenuItem, Et as Attachment, F as LearnFromUserActionResult, Ft as UseThreadsInput, G as JsonSerializable, Gt as CopilotSidebarViewProps, H as useConfigureSuggestions, Ht as CopilotPopupView, I as UseLearnFromUserActionRecorder, It as UseThreadsResult, J as UseAgentUpdate, Jt as CopilotChatToggleButton, K as useAgentContext, Kt as CopilotModalHeader, L as useLearnFromUserAction, Lt as useThreads, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as AudioRecorderError, Mt as CopilotThreadsDrawerProps, N as useLearnFromUserActionInCurrentThread, Nn as AudioRecorderState, Nt as CopilotThreadsDrawerRowRenderer, O as UseAttachmentsProps, On as CopilotChatConfigurationProviderProps, Ot as AttachmentsConfig, P as LearnFromUserActionInput, Pn as CopilotChatAudioRecorder, Pt as Thread, Q as useRenderTool, Qt as CopilotChat, R as UseMemoriesResult, Rt as CopilotPopup, S as MemoryScope, Sn as CopilotChatToolCallsView, St as MCPAppsActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatInputProps, Tt as WildcardToolCallRender, U as useSuggestions, Ut as CopilotPopupViewProps, V as useInterrupt, Vt as CopilotSidebarProps, W as AgentContextInput, Wt as CopilotSidebarView, X as useHumanInTheLoop, Xt as DefaultCloseIcon, Y as useAgent, Yt as CopilotChatToggleButtonProps, Z as useDefaultRenderTool, Zt as DefaultOpenIcon, _ as CopilotKitCoreReactConfig, _n as CopilotChatReasoningMessageProps, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as INTELLIGENCE_TURN_HEAD, at as InterruptEvent, b as MemoryChanges, bn as CopilotChatAssistantMessage, bt as MCPAppsActivityContentSchema, c as InspectorAnchor, cn as getIntelligenceTurnAnchors, ct as InterruptResolveFn, d as CopilotKitProvider, dn as IntelligenceIndicatorViewProps, dt as ReactHumanInTheLoop, en as CopilotChatView, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatSuggestionView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as CopilotChatReasoningMessage, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as CopilotChatSuggestionPillProps, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatMessageViewProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as useCopilotChatConfiguration, jt as CopilotThreadsDrawer, k as UseAttachmentsReturn, kn as CopilotChatConfigurationValue, kt as CopilotChatAttachmentRenderer, l as SandboxFunctionsContext, ln as IntelligenceIndicatorStatus, lt as ResumeEntry, m as CopilotKitContextValue, mn as CopilotChatSuggestionPill, mt as ReactToolCallRenderer, nn as AutoScrollMode, nt as SandboxFunction, o as A2UIUserAction, on as IntelligenceIndicator, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatSuggestionViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotModalHeaderProps, r as CopilotKitProps, rn as CopilotChatMessageView, rt as Interrupt, s as createA2UIMessageRenderer, sn as IntelligenceIndicatorProps, st as InterruptRenderProps, t as CopilotKit, tn as CopilotChatViewProps, tt as useRenderActivityMessage, u as useSandboxFunctions, un as IntelligenceIndicatorView, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as CopilotChatUserMessage, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatInput, wt as CopilotKitInspectorProps, x as MemoryKind, xn as CopilotChatAssistantMessageProps, xt as MCPAppsActivityRenderer, y as Memory, yn as CopilotChatUserMessageProps, yt as MCPAppsActivityContent, z as useMemories, zt as CopilotPopupProps } from "../copilotkit-BfFY1fzd.cjs";
2
2
  import "./index.css";
3
3
  import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
4
4
  export * from "@copilotkit/core";
@@ -1,4 +1,4 @@
1
- import { $ as useComponent, $t as CopilotChatProps, A as useAttachments, An as CopilotChatLabels, At as CopilotChatAttachmentQueue, B as UseInterruptConfig, Bt as CopilotSidebar, C as NewMemory, Cn as CopilotChatToolCallsViewProps, Ct as CopilotKitInspector, D as useLearningContainers, Dn as CopilotChatConfigurationProvider, Dt as AttachmentModality, E as UseLearningContainersArgs, En as ToolsMenuItem, Et as Attachment, F as LearnFromUserActionResult, Ft as UseThreadsInput, G as JsonSerializable, Gt as CopilotSidebarViewProps, H as useConfigureSuggestions, Ht as CopilotPopupView, I as UseLearnFromUserActionRecorder, It as UseThreadsResult, J as UseAgentUpdate, Jt as CopilotChatToggleButton, K as useAgentContext, Kt as CopilotModalHeader, L as useLearnFromUserAction, Lt as useThreads, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as AudioRecorderError, Mt as CopilotThreadsDrawerProps, N as useLearnFromUserActionInCurrentThread, Nn as AudioRecorderState, Nt as CopilotThreadsDrawerRowRenderer, O as UseAttachmentsProps, On as CopilotChatConfigurationProviderProps, Ot as AttachmentsConfig, P as LearnFromUserActionInput, Pn as CopilotChatAudioRecorder, Pt as Thread, Q as useRenderTool, Qt as CopilotChat, R as UseMemoriesResult, Rt as CopilotPopup, S as MemoryScope, Sn as CopilotChatToolCallsView, St as MCPAppsActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatInputProps, Tt as WildcardToolCallRender, U as useSuggestions, Ut as CopilotPopupViewProps, V as useInterrupt, Vt as CopilotSidebarProps, W as AgentContextInput, Wt as CopilotSidebarView, X as useHumanInTheLoop, Xt as DefaultCloseIcon, Y as useAgent, Yt as CopilotChatToggleButtonProps, Z as useDefaultRenderTool, Zt as DefaultOpenIcon, _ as CopilotKitCoreReactConfig, _n as CopilotChatReasoningMessageProps, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as INTELLIGENCE_TURN_HEAD, at as InterruptEvent, b as MemoryChanges, bn as CopilotChatAssistantMessage, bt as MCPAppsActivityContentSchema, c as InspectorAnchor, cn as getIntelligenceTurnAnchors, ct as InterruptResolveFn, d as CopilotKitProvider, dn as IntelligenceIndicatorViewProps, dt as ReactHumanInTheLoop, en as CopilotChatView, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatSuggestionView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as CopilotChatReasoningMessage, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as CopilotChatSuggestionPillProps, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatMessageViewProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as useCopilotChatConfiguration, jt as CopilotThreadsDrawer, k as UseAttachmentsReturn, kn as CopilotChatConfigurationValue, kt as CopilotChatAttachmentRenderer, l as SandboxFunctionsContext, ln as IntelligenceIndicatorStatus, lt as ResumeEntry, m as CopilotKitContextValue, mn as CopilotChatSuggestionPill, mt as ReactToolCallRenderer, nn as AutoScrollMode, nt as SandboxFunction, o as A2UIUserAction, on as IntelligenceIndicator, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatSuggestionViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotModalHeaderProps, r as CopilotKitProps, rn as CopilotChatMessageView, rt as Interrupt, s as createA2UIMessageRenderer, sn as IntelligenceIndicatorProps, st as InterruptRenderProps, t as CopilotKit, tn as CopilotChatViewProps, tt as useRenderActivityMessage, u as useSandboxFunctions, un as IntelligenceIndicatorView, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as CopilotChatUserMessage, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatInput, wt as CopilotKitInspectorProps, x as MemoryKind, xn as CopilotChatAssistantMessageProps, xt as MCPAppsActivityRenderer, y as Memory, yn as CopilotChatUserMessageProps, yt as MCPAppsActivityContent, z as useMemories, zt as CopilotPopupProps } from "../copilotkit-BpR0k6_Z.mjs";
1
+ import { $ as useComponent, $t as CopilotChatProps, A as useAttachments, An as CopilotChatLabels, At as CopilotChatAttachmentQueue, B as UseInterruptConfig, Bt as CopilotSidebar, C as NewMemory, Cn as CopilotChatToolCallsViewProps, Ct as CopilotKitInspector, D as useLearningContainers, Dn as CopilotChatConfigurationProvider, Dt as AttachmentModality, E as UseLearningContainersArgs, En as ToolsMenuItem, Et as Attachment, F as LearnFromUserActionResult, Ft as UseThreadsInput, G as JsonSerializable, Gt as CopilotSidebarViewProps, H as useConfigureSuggestions, Ht as CopilotPopupView, I as UseLearnFromUserActionRecorder, It as UseThreadsResult, J as UseAgentUpdate, Jt as CopilotChatToggleButton, K as useAgentContext, Kt as CopilotModalHeader, L as useLearnFromUserAction, Lt as useThreads, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as AudioRecorderError, Mt as CopilotThreadsDrawerProps, N as useLearnFromUserActionInCurrentThread, Nn as AudioRecorderState, Nt as CopilotThreadsDrawerRowRenderer, O as UseAttachmentsProps, On as CopilotChatConfigurationProviderProps, Ot as AttachmentsConfig, P as LearnFromUserActionInput, Pn as CopilotChatAudioRecorder, Pt as Thread, Q as useRenderTool, Qt as CopilotChat, R as UseMemoriesResult, Rt as CopilotPopup, S as MemoryScope, Sn as CopilotChatToolCallsView, St as MCPAppsActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatInputProps, Tt as WildcardToolCallRender, U as useSuggestions, Ut as CopilotPopupViewProps, V as useInterrupt, Vt as CopilotSidebarProps, W as AgentContextInput, Wt as CopilotSidebarView, X as useHumanInTheLoop, Xt as DefaultCloseIcon, Y as useAgent, Yt as CopilotChatToggleButtonProps, Z as useDefaultRenderTool, Zt as DefaultOpenIcon, _ as CopilotKitCoreReactConfig, _n as CopilotChatReasoningMessageProps, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as INTELLIGENCE_TURN_HEAD, at as InterruptEvent, b as MemoryChanges, bn as CopilotChatAssistantMessage, bt as MCPAppsActivityContentSchema, c as InspectorAnchor, cn as getIntelligenceTurnAnchors, ct as InterruptResolveFn, d as CopilotKitProvider, dn as IntelligenceIndicatorViewProps, dt as ReactHumanInTheLoop, en as CopilotChatView, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatSuggestionView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as CopilotChatReasoningMessage, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as CopilotChatSuggestionPillProps, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatMessageViewProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as useCopilotChatConfiguration, jt as CopilotThreadsDrawer, k as UseAttachmentsReturn, kn as CopilotChatConfigurationValue, kt as CopilotChatAttachmentRenderer, l as SandboxFunctionsContext, ln as IntelligenceIndicatorStatus, lt as ResumeEntry, m as CopilotKitContextValue, mn as CopilotChatSuggestionPill, mt as ReactToolCallRenderer, nn as AutoScrollMode, nt as SandboxFunction, o as A2UIUserAction, on as IntelligenceIndicator, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatSuggestionViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotModalHeaderProps, r as CopilotKitProps, rn as CopilotChatMessageView, rt as Interrupt, s as createA2UIMessageRenderer, sn as IntelligenceIndicatorProps, st as InterruptRenderProps, t as CopilotKit, tn as CopilotChatViewProps, tt as useRenderActivityMessage, u as useSandboxFunctions, un as IntelligenceIndicatorView, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as CopilotChatUserMessage, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatInput, wt as CopilotKitInspectorProps, x as MemoryKind, xn as CopilotChatAssistantMessageProps, xt as MCPAppsActivityRenderer, y as Memory, yn as CopilotChatUserMessageProps, yt as MCPAppsActivityContent, z as useMemories, zt as CopilotPopupProps } from "../copilotkit-Bp6BD8xe.mjs";
2
2
  import "./index.css";
3
3
  import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
4
4
  export * from "@copilotkit/core";
package/dist/v2/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { $ as useCapabilities, A as CopilotChatMessageView, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotChatAudioRecorder, D as CopilotChat, E as DefaultOpenIcon, 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, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as AudioRecorderError, T as DefaultCloseIcon, Tt as useCopilotChatConfiguration, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as CopilotKitInspector, at as useComponent, b as CopilotSidebar, bt as CopilotKitCoreReact, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as SandboxFunctionsContext, gt as MCPAppsActivityType, ht as MCPAppsActivityRenderer, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, k as CopilotChatAttachmentQueue, lt as CopilotKitProvider, mt as MCPAppsActivityContentSchema, nt as useHumanInTheLoop, ot as useFrontendTool, pt as useSandboxFunctions, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useRenderToolCall, w as CopilotChatToggleButton, wt as CopilotChatConfigurationProvider, x as CopilotPopupView, xt as CopilotChatInput_default, y as CopilotPopup, yt as useCopilotKit, z as CopilotChatAttachmentRenderer } from "../copilotkit-BQT2ngSh.mjs";
3
+ import { $ as useCapabilities, A as CopilotChatMessageView, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotChatAudioRecorder, D as CopilotChat, E as DefaultOpenIcon, 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, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as AudioRecorderError, T as DefaultCloseIcon, Tt as useCopilotChatConfiguration, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as CopilotKitInspector, at as useComponent, b as CopilotSidebar, bt as CopilotKitCoreReact, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as SandboxFunctionsContext, gt as MCPAppsActivityType, ht as MCPAppsActivityRenderer, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, k as CopilotChatAttachmentQueue, lt as CopilotKitProvider, mt as MCPAppsActivityContentSchema, nt as useHumanInTheLoop, ot as useFrontendTool, pt as useSandboxFunctions, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useRenderToolCall, w as CopilotChatToggleButton, wt as CopilotChatConfigurationProvider, x as CopilotPopupView, xt as CopilotChatInput_default, y as CopilotPopup, yt as useCopilotKit, z as CopilotChatAttachmentRenderer } from "../copilotkit-ympAovXs.mjs";
4
4
  import "./index.css";
5
5
  import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
6
6
 
@@ -4367,57 +4367,58 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4367
4367
  UseAgentUpdate.OnRunStatusChanged
4368
4368
  ];
4369
4369
  function useAgent({ agentId, updates, throttleMs } = {}) {
4370
- agentId ?? (agentId = _copilotkit_shared.DEFAULT_AGENT_ID);
4370
+ const chatConfig = useCopilotChatConfiguration();
4371
+ const resolvedAgentId = agentId ?? chatConfig?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID;
4371
4372
  const { copilotkit } = useCopilotKit();
4372
4373
  const providerThrottleMs = copilotkit.defaultThrottleMs;
4373
4374
  const [, forceUpdate] = (0, react.useReducer)((x) => x + 1, 0);
4374
4375
  const updateFlags = (0, react.useMemo)(() => updates ?? ALL_UPDATES, [JSON.stringify(updates)]);
4375
4376
  const provisionalAgentCache = (0, react.useRef)(/* @__PURE__ */ new Map());
4376
4377
  const agent = (0, react.useMemo)(() => {
4377
- const existing = copilotkit.getAgent(agentId);
4378
+ const existing = copilotkit.getAgent(resolvedAgentId);
4378
4379
  if (existing) {
4379
- provisionalAgentCache.current.delete(agentId);
4380
+ provisionalAgentCache.current.delete(resolvedAgentId);
4380
4381
  return existing;
4381
4382
  }
4382
4383
  const isRuntimeConfigured = copilotkit.runtimeUrl !== void 0;
4383
4384
  const status = copilotkit.runtimeConnectionStatus;
4384
4385
  if (isRuntimeConfigured && (status === _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Disconnected || status === _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Connecting)) {
4385
- const cached = provisionalAgentCache.current.get(agentId);
4386
+ const cached = provisionalAgentCache.current.get(resolvedAgentId);
4386
4387
  if (cached) {
4387
4388
  copilotkit.applyHeadersToAgent(cached);
4388
4389
  return cached;
4389
4390
  }
4390
4391
  const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
4391
4392
  runtimeUrl: copilotkit.runtimeUrl,
4392
- agentId,
4393
+ agentId: resolvedAgentId,
4393
4394
  transport: copilotkit.runtimeTransport,
4394
4395
  runtimeMode: "pending"
4395
4396
  });
4396
4397
  copilotkit.applyHeadersToAgent(provisional);
4397
- provisionalAgentCache.current.set(agentId, provisional);
4398
+ provisionalAgentCache.current.set(resolvedAgentId, provisional);
4398
4399
  return provisional;
4399
4400
  }
4400
4401
  if (isRuntimeConfigured && status === _copilotkit_core.CopilotKitCoreRuntimeConnectionStatus.Error) {
4401
- const cached = provisionalAgentCache.current.get(agentId);
4402
+ const cached = provisionalAgentCache.current.get(resolvedAgentId);
4402
4403
  if (cached) {
4403
4404
  copilotkit.applyHeadersToAgent(cached);
4404
4405
  return cached;
4405
4406
  }
4406
4407
  const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
4407
4408
  runtimeUrl: copilotkit.runtimeUrl,
4408
- agentId,
4409
+ agentId: resolvedAgentId,
4409
4410
  transport: copilotkit.runtimeTransport,
4410
4411
  runtimeMode: "pending"
4411
4412
  });
4412
4413
  copilotkit.applyHeadersToAgent(provisional);
4413
- provisionalAgentCache.current.set(agentId, provisional);
4414
+ provisionalAgentCache.current.set(resolvedAgentId, provisional);
4414
4415
  return provisional;
4415
4416
  }
4416
4417
  const knownAgents = Object.keys(copilotkit.agents ?? {});
4417
4418
  const runtimePart = isRuntimeConfigured ? `runtimeUrl=${copilotkit.runtimeUrl}` : "no runtimeUrl";
4418
- throw new Error(`useAgent: Agent '${agentId}' not found after runtime sync (${runtimePart}). ` + (knownAgents.length ? `Known agents: [${knownAgents.join(", ")}]` : "No agents registered.") + " Verify your runtime /info and/or agents__unsafe_dev_only.");
4419
+ throw new Error(`useAgent: Agent '${resolvedAgentId}' not found after runtime sync (${runtimePart}). ` + (knownAgents.length ? `Known agents: [${knownAgents.join(", ")}]` : "No agents registered.") + " Verify your runtime /info and/or agents__unsafe_dev_only.");
4419
4420
  }, [
4420
- agentId,
4421
+ resolvedAgentId,
4421
4422
  copilotkit.agents,
4422
4423
  copilotkit.runtimeConnectionStatus,
4423
4424
  copilotkit.runtimeUrl,
@@ -4462,7 +4463,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4462
4463
  (0, react.useEffect)(() => {
4463
4464
  if (agent instanceof _ag_ui_client.HttpAgent) copilotkit.applyHeadersToAgent(agent);
4464
4465
  }, [agent, JSON.stringify(copilotkit.headers)]);
4465
- const chatConfig = useCopilotChatConfiguration();
4466
4466
  const configThreadId = chatConfig?.threadId;
4467
4467
  const configHasExplicitThreadId = chatConfig?.hasExplicitThreadId;
4468
4468
  (0, react.useEffect)(() => {
@@ -4479,13 +4479,15 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4479
4479
  //#endregion
4480
4480
  //#region src/v2/hooks/use-capabilities.tsx
4481
4481
  /**
4482
- * Returns the capabilities declared by the given agent (or the default agent).
4482
+ * Returns the capabilities declared by the given agent (or the agent resolved
4483
+ * from the surrounding chat configuration, falling back to the default agent).
4483
4484
  * Capabilities are populated from the runtime `/info` response at connection
4484
4485
  * time. The hook reads them synchronously from the agent instance — there is
4485
4486
  * no separate loading state, but the value will be `undefined` until the
4486
4487
  * runtime handshake completes.
4487
4488
  *
4488
- * @param agentId - Optional agent ID. If omitted, uses the default agent.
4489
+ * @param agentId - Optional agent ID. If omitted, inherits the surrounding
4490
+ * chat configuration's agent, falling back to the default agent.
4489
4491
  * @returns The agent's capabilities, or `undefined` if the agent doesn't
4490
4492
  * declare capabilities.
4491
4493
  */
@@ -5058,6 +5060,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
5058
5060
  })), [coreThreads]);
5059
5061
  const storeIsLoading = useThreadStoreSelector(store, _copilotkit_core.ɵselectThreadsIsLoading);
5060
5062
  const storeError = useThreadStoreSelector(store, _copilotkit_core.ɵselectThreadsError);
5063
+ const fetchMoreError = useThreadStoreSelector(store, _copilotkit_core.ɵselectFetchMoreError);
5061
5064
  const hasMoreThreads = useThreadStoreSelector(store, _copilotkit_core.ɵselectHasNextPage);
5062
5065
  const isFetchingMoreThreads = useThreadStoreSelector(store, _copilotkit_core.ɵselectIsFetchingNextPage);
5063
5066
  const isMutating = useThreadStoreSelector(store, _copilotkit_core.ɵselectIsMutating);
@@ -5163,6 +5166,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
5163
5166
  isLoading,
5164
5167
  error,
5165
5168
  listError,
5169
+ fetchMoreError,
5166
5170
  hasMoreThreads,
5167
5171
  isFetchingMoreThreads,
5168
5172
  isMutating,
@@ -9104,7 +9108,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9104
9108
  * during prerender to avoid hydration mismatch).
9105
9109
  * - Feeds the element domain data: `threads`, `loading`, `error`,
9106
9110
  * `activeThreadId`, `licensed`, fetch-more state.
9107
- * - Routes the element's nine outbound events to core thread operations
9111
+ * - Routes the element's outbound events to core thread operations
9108
9112
  * ({@link useThreads}) and chat-configuration changes.
9109
9113
  * - Registers with the surrounding chat configuration so the header
9110
9114
  * thread-list launcher appears, and binds the element `open` state to the
@@ -9131,16 +9135,16 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9131
9135
  * </CopilotKitProvider>
9132
9136
  * ```
9133
9137
  */
9134
- function CopilotThreadsDrawer({ agentId, onThreadSelect, onNewThread, onLicensed, licenseUrl, renderRow, label, limit, "data-testid": dataTestId = "copilot-threads-drawer" }) {
9138
+ function CopilotThreadsDrawer({ agentId, onThreadSelect, onNewThread, onLicensed, licenseUrl, renderRow, label, recentLabel, collapsible, onCollapseChange, limit, "data-testid": dataTestId = "copilot-threads-drawer" }) {
9135
9139
  const configuration = useCopilotChatConfiguration();
9136
9140
  const { status, checkFeature } = useLicenseContext();
9137
9141
  const licensePresent = status === "valid" || status === "expiring";
9138
9142
  const featureLicensed = checkFeature("threads");
9139
9143
  const licensed = licensePresent && featureLicensed;
9140
9144
  const licensePending = status === null;
9141
- const resolvedAgentId = agentId ?? configuration?.agentId ?? "default";
9145
+ const resolvedAgentId = agentId ?? configuration?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID;
9142
9146
  const activeThreadId = configuration?.threadId ?? null;
9143
- const { threads, isLoading, listError, hasMoreThreads, isFetchingMoreThreads, archiveThread, unarchiveThread, deleteThread, fetchMoreThreads, refetchThreads, startNewThread } = useThreads({
9147
+ const { threads, isLoading, listError, fetchMoreError, hasMoreThreads, isFetchingMoreThreads, archiveThread, unarchiveThread, deleteThread, fetchMoreThreads, refetchThreads, startNewThread } = useThreads({
9144
9148
  agentId: resolvedAgentId,
9145
9149
  includeArchived: true,
9146
9150
  enabled: licensed,
@@ -9221,6 +9225,9 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9221
9225
  const handleLoadMore = (0, react.useCallback)(() => {
9222
9226
  fetchMoreThreads();
9223
9227
  }, [fetchMoreThreads]);
9228
+ const handleCollapseChange = (0, react.useCallback)((collapsed) => {
9229
+ onCollapseChange?.(collapsed);
9230
+ }, [onCollapseChange]);
9224
9231
  const handlersRef = (0, react.useRef)({
9225
9232
  handleThreadSelected,
9226
9233
  handleNewThread,
@@ -9231,7 +9238,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9231
9238
  handleRetry,
9232
9239
  handleOpenChange,
9233
9240
  handleLicensed,
9234
- handleLoadMore
9241
+ handleLoadMore,
9242
+ handleCollapseChange
9235
9243
  });
9236
9244
  handlersRef.current = {
9237
9245
  handleThreadSelected,
@@ -9243,7 +9251,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9243
9251
  handleRetry,
9244
9252
  handleOpenChange,
9245
9253
  handleLicensed,
9246
- handleLoadMore
9254
+ handleLoadMore,
9255
+ handleCollapseChange
9247
9256
  };
9248
9257
  (0, react.useEffect)(() => {
9249
9258
  const el = elementRef.current;
@@ -9278,6 +9287,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9278
9287
  };
9279
9288
  const onLicensedEvent = () => handlersRef.current.handleLicensed();
9280
9289
  const onLoadMore = () => handlersRef.current.handleLoadMore();
9290
+ const onCollapseChangeEvent = (event) => {
9291
+ const detail = event.detail;
9292
+ handlersRef.current.handleCollapseChange(detail.collapsed);
9293
+ };
9281
9294
  el.addEventListener("thread-selected", onThreadSelected);
9282
9295
  el.addEventListener("new-thread", onNewThreadEvent);
9283
9296
  el.addEventListener("archive", onArchive);
@@ -9288,6 +9301,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9288
9301
  el.addEventListener("retry", onRetry);
9289
9302
  el.addEventListener("licensed", onLicensedEvent);
9290
9303
  el.addEventListener("load-more", onLoadMore);
9304
+ el.addEventListener("collapse-change", onCollapseChangeEvent);
9291
9305
  return () => {
9292
9306
  el.removeEventListener("thread-selected", onThreadSelected);
9293
9307
  el.removeEventListener("new-thread", onNewThreadEvent);
@@ -9299,6 +9313,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9299
9313
  el.removeEventListener("retry", onRetry);
9300
9314
  el.removeEventListener("licensed", onLicensedEvent);
9301
9315
  el.removeEventListener("load-more", onLoadMore);
9316
+ el.removeEventListener("collapse-change", onCollapseChangeEvent);
9302
9317
  };
9303
9318
  }, [mounted]);
9304
9319
  (0, react.useEffect)(() => {
@@ -9315,9 +9330,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9315
9330
  el.licensed = licensed || licensePending;
9316
9331
  el.hasMore = hasMoreThreads;
9317
9332
  el.fetchingMore = isFetchingMoreThreads;
9333
+ el.fetchMoreError = fetchMoreError ? fetchMoreError.message : null;
9318
9334
  }, [
9319
9335
  isLoading,
9320
9336
  listError,
9337
+ fetchMoreError,
9321
9338
  activeThreadId,
9322
9339
  licensed,
9323
9340
  licensePending,
@@ -9340,6 +9357,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9340
9357
  if (!el) return;
9341
9358
  if (licenseUrl !== void 0) el.licenseUrl = licenseUrl;
9342
9359
  }, [licenseUrl, mounted]);
9360
+ (0, react.useEffect)(() => {
9361
+ const el = elementRef.current;
9362
+ if (!el) return;
9363
+ if (collapsible !== void 0) el.collapsible = collapsible;
9364
+ }, [collapsible, mounted]);
9343
9365
  const rowChildren = (0, react.useMemo)(() => {
9344
9366
  if (!renderRow) return null;
9345
9367
  return drawerThreads.map((drawerThread) => {
@@ -9360,7 +9382,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
9360
9382
  if (!mounted) return null;
9361
9383
  return react.default.createElement(_copilotkit_web_components_threads_drawer.COPILOTKIT_THREADS_DRAWER_TAG, {
9362
9384
  ref: elementRef,
9363
- "data-testid": dataTestId
9385
+ "data-testid": dataTestId,
9386
+ ...recentLabel !== void 0 ? { "recent-label": recentLabel } : {}
9364
9387
  }, rowChildren);
9365
9388
  }
9366
9389
  CopilotThreadsDrawer.displayName = "CopilotThreadsDrawer";
@@ -10899,8 +10922,18 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
10899
10922
  }, [agent, getSubscriber]);
10900
10923
  };
10901
10924
  function CopilotListenersAgentSubscription() {
10902
- const resolvedAgentId = useCopilotChatConfiguration()?.agentId;
10903
- const { agent } = useAgent({ agentId: resolvedAgentId });
10925
+ const { copilotkit } = useCopilotKit();
10926
+ const configAgentId = useCopilotChatConfiguration()?.agentId;
10927
+ const { agent } = useAgent({ agentId: (0, react.useMemo)(() => {
10928
+ const requested = configAgentId ?? _copilotkit_shared.DEFAULT_AGENT_ID;
10929
+ const registered = copilotkit.agents ?? {};
10930
+ if (registered[requested]) return requested;
10931
+ if (requested === _copilotkit_shared.DEFAULT_AGENT_ID) {
10932
+ const firstRegistered = Object.keys(registered)[0];
10933
+ if (firstRegistered) return firstRegistered;
10934
+ }
10935
+ return requested;
10936
+ }, [configAgentId, copilotkit.agents]) });
10904
10937
  usePredictStateSubscription(agent);
10905
10938
  return null;
10906
10939
  }