@copilotkit/react-core 1.74.0 → 1.75.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.
@@ -1605,7 +1605,7 @@ function useRenderToolCall() {
1605
1605
 
1606
1606
  //#endregion
1607
1607
  //#region package.json
1608
- var version = "1.74.0";
1608
+ var version = "1.75.0";
1609
1609
 
1610
1610
  //#endregion
1611
1611
  //#region src/v2/components/CopilotKitInspector.tsx
@@ -6334,7 +6334,7 @@ function BoundInspectorButton({ inspectorButton, messageId, openInspector, ...pr
6334
6334
  })
6335
6335
  });
6336
6336
  }
6337
- function CopilotChatAssistantMessage({ message, messages, isRunning, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible = true, markdownRenderer, toolbar, copyButton, inspectorButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, toolCallsView, children, className, ...props }) {
6337
+ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible = true, markdownRenderer, toolbar, copyButton, inspectorButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, toolCallsView, children, className, ...props }) {
6338
6338
  useKatexStyles();
6339
6339
  const { isInspectorEnabled, openInspector } = useCopilotKitInspector();
6340
6340
  const shortcutsHidden = useInspectorShortcutsHidden();
@@ -6370,7 +6370,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, onThumbsUp,
6370
6370
  messages
6371
6371
  });
6372
6372
  const hasContent = !!(message.content && message.content.trim().length > 0);
6373
- const isLatestAssistantMessage = message.role === "assistant" && messages?.[messages.length - 1]?.id === message.id;
6373
+ const isLatestAssistantMessage = message.role === "assistant" && (isLatest ?? messages?.[messages.length - 1]?.id === message.id);
6374
6374
  const shouldShowToolbar = toolbarVisible && (hasContent || showInspectorShortcut) && !(isRunning && isLatestAssistantMessage);
6375
6375
  if (children) return /* @__PURE__ */ jsx("div", {
6376
6376
  "data-copilotkit": true,
@@ -6884,8 +6884,8 @@ function formatDuration(seconds) {
6884
6884
  if (secs === 0) return `${mins} minute${mins > 1 ? "s" : ""}`;
6885
6885
  return `${mins}m ${secs}s`;
6886
6886
  }
6887
- function CopilotChatReasoningMessage({ message, messages, isRunning, header, contentView, toggle, children, className, ...props }) {
6888
- const isLatest = messages?.[messages.length - 1]?.id === message.id;
6887
+ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: isLatestProp, header, contentView, toggle, children, className, ...props }) {
6888
+ const isLatest = isLatestProp ?? messages?.[messages.length - 1]?.id === message.id;
6889
6889
  const isStreaming = !!(isRunning && isLatest);
6890
6890
  const hasContent = !!(message.content && message.content.length > 0);
6891
6891
  const startTimeRef = useRef(null);
@@ -7280,24 +7280,31 @@ const INTELLIGENCE_TURN_HEAD = "__cpk_turn_head__";
7280
7280
  * emits exactly one `IntelligenceIndicator` per entry, keyed by the turn id and
7281
7281
  * positioned at the anchor; the per-turn key also lets every past turn keep its
7282
7282
  * own indicator in scroll-back.
7283
+ *
7284
+ * `visibleMessages` is what actually renders, when that differs from
7285
+ * `messages` (the chat's `transformMessages`). Turns are still read from the
7286
+ * full list, so hiding a user message does not merge its turn into the one
7287
+ * before it, and anchors are only chosen among visible messages. A message the
7288
+ * transform built itself joins the turn of the visible message before it.
7283
7289
  */
7284
- function getIntelligenceTurnAnchors(messages) {
7285
- const anchors = /* @__PURE__ */ new Map();
7290
+ function getIntelligenceTurnAnchors(messages, visibleMessages = messages) {
7291
+ const turnOfMessage = /* @__PURE__ */ new Map();
7286
7292
  let turnId = INTELLIGENCE_TURN_HEAD;
7287
- let anchorId = null;
7288
- const commit = () => {
7289
- if (anchorId !== null) anchors.set(anchorId, turnId);
7290
- anchorId = null;
7291
- };
7292
7293
  for (const m of messages) {
7293
- if (m.role === "user") {
7294
- commit();
7295
- turnId = m.id;
7296
- continue;
7294
+ if (m.role === "user") turnId = m.id;
7295
+ turnOfMessage.set(m.id, turnId);
7296
+ }
7297
+ const anchors = /* @__PURE__ */ new Map();
7298
+ const anchoredTurns = /* @__PURE__ */ new Set();
7299
+ let currentTurn = INTELLIGENCE_TURN_HEAD;
7300
+ for (const m of visibleMessages) {
7301
+ currentTurn = turnOfMessage.get(m.id) ?? currentTurn;
7302
+ if (m.role === "user") continue;
7303
+ if (!anchoredTurns.has(currentTurn) && messageHasMatchingToolCall(m)) {
7304
+ anchors.set(m.id, currentTurn);
7305
+ anchoredTurns.add(currentTurn);
7297
7306
  }
7298
- if (anchorId === null && messageHasMatchingToolCall(m)) anchorId = m.id;
7299
7307
  }
7300
- commit();
7301
7308
  return anchors;
7302
7309
  }
7303
7310
  /**
@@ -7443,11 +7450,12 @@ function resolveSlotComponent(slot, DefaultComponent) {
7443
7450
  /**
7444
7451
  * Memoized wrapper for assistant messages to prevent re-renders when other messages change.
7445
7452
  */
7446
- const MemoizedAssistantMessage = React.memo(function MemoizedAssistantMessage({ message, messages, isRunning, AssistantMessageComponent, slotProps }) {
7453
+ const MemoizedAssistantMessage = React.memo(function MemoizedAssistantMessage({ message, messages, isRunning, isLatest, AssistantMessageComponent, slotProps }) {
7447
7454
  return /* @__PURE__ */ jsx(AssistantMessageComponent, {
7448
7455
  message,
7449
7456
  messages,
7450
7457
  isRunning,
7458
+ isLatest,
7451
7459
  ...slotProps
7452
7460
  });
7453
7461
  }, (prevProps, nextProps) => {
@@ -7469,7 +7477,7 @@ const MemoizedAssistantMessage = React.memo(function MemoizedAssistantMessage({
7469
7477
  if (prevToolResults.length !== nextToolResults.length) return false;
7470
7478
  for (let i = 0; i < prevToolResults.length; i++) if (prevToolResults[i].content !== nextToolResults[i].content) return false;
7471
7479
  }
7472
- if (nextProps.messages[nextProps.messages.length - 1]?.id === nextProps.message.id && prevProps.isRunning !== nextProps.isRunning) return false;
7480
+ if ((prevProps.isRunning && prevProps.isLatest) !== (nextProps.isRunning && nextProps.isLatest)) return false;
7473
7481
  if (prevProps.AssistantMessageComponent !== nextProps.AssistantMessageComponent) return false;
7474
7482
  if (prevProps.slotProps !== nextProps.slotProps) return false;
7475
7483
  return true;
@@ -7503,20 +7511,19 @@ const MemoizedActivityMessage = React.memo(function MemoizedActivityMessage({ me
7503
7511
  /**
7504
7512
  * Memoized wrapper for reasoning messages to prevent re-renders when other messages change.
7505
7513
  */
7506
- const MemoizedReasoningMessage = React.memo(function MemoizedReasoningMessage({ message, messages, isRunning, ReasoningMessageComponent, slotProps }) {
7514
+ const MemoizedReasoningMessage = React.memo(function MemoizedReasoningMessage({ message, messages, isRunning, isLatest, ReasoningMessageComponent, slotProps }) {
7507
7515
  return /* @__PURE__ */ jsx(ReasoningMessageComponent, {
7508
7516
  message,
7509
7517
  messages,
7510
7518
  isRunning,
7519
+ isLatest,
7511
7520
  ...slotProps
7512
7521
  });
7513
7522
  }, (prevProps, nextProps) => {
7514
7523
  if (prevProps.message.id !== nextProps.message.id) return false;
7515
7524
  if (prevProps.message.content !== nextProps.message.content) return false;
7516
- const prevIsLatest = prevProps.messages[prevProps.messages.length - 1]?.id === prevProps.message.id;
7517
- const nextIsLatest = nextProps.messages[nextProps.messages.length - 1]?.id === nextProps.message.id;
7518
- if (prevIsLatest !== nextIsLatest) return false;
7519
- if (nextIsLatest && prevProps.isRunning !== nextProps.isRunning) return false;
7525
+ if (prevProps.isLatest !== nextProps.isLatest) return false;
7526
+ if (nextProps.isLatest && prevProps.isRunning !== nextProps.isRunning) return false;
7520
7527
  if (prevProps.ReasoningMessageComponent !== nextProps.ReasoningMessageComponent) return false;
7521
7528
  if (prevProps.slotProps !== nextProps.slotProps) return false;
7522
7529
  return true;
@@ -7600,7 +7607,7 @@ function deduplicateMessages(messages) {
7600
7607
  return [...acc.values()];
7601
7608
  }
7602
7609
  const VIRTUALIZE_THRESHOLD = 50;
7603
- function CopilotChatMessageView({ messages = [], assistantMessage, userMessage, reasoningMessage, cursor, intelligenceIndicator, isRunning = false, children, className, ...props }) {
7610
+ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage, reasoningMessage, cursor, intelligenceIndicator, isRunning = false, transformMessages, children, className, ...props }) {
7604
7611
  const isPinnedToBottom = useContext(ScrollPinnedContext);
7605
7612
  const renderCustomMessage = useRenderCustomMessages();
7606
7613
  const { renderActivityMessage } = useRenderActivityMessage();
@@ -7633,13 +7640,27 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7633
7640
  return copilotkit.getStateByRun(config.agentId, config.threadId, resolvedRunId);
7634
7641
  };
7635
7642
  const deduplicatedMessages = useMemo(() => deduplicateMessages(messages), [messages]);
7643
+ const renderedMessages = useMemo(() => transformMessages ? transformMessages(deduplicatedMessages) : deduplicatedMessages, [deduplicatedMessages, transformMessages]);
7644
+ const latestRenderedId = renderedMessages[renderedMessages.length - 1]?.id;
7645
+ const transformDuplicateId = useMemo(() => {
7646
+ if (process.env.NODE_ENV === "production" || !transformMessages) return;
7647
+ const seen = /* @__PURE__ */ new Set();
7648
+ for (const message of renderedMessages) {
7649
+ if (seen.has(message.id)) return message.id;
7650
+ seen.add(message.id);
7651
+ }
7652
+ }, [renderedMessages, transformMessages]);
7653
+ useEffect(() => {
7654
+ if (transformDuplicateId === void 0) return;
7655
+ console.warn(`[CopilotKit] CopilotChatMessageView: \`transformMessages\` returned more than one message with id "${transformDuplicateId}". Return each id at most once; a message you create needs its own id, stable across renders.`);
7656
+ }, [transformDuplicateId]);
7636
7657
  const rowKeyStoreRef = useRef(null);
7637
7658
  rowKeyStoreRef.current ??= createRowKeyStore();
7638
7659
  const rowKeyStore = rowKeyStoreRef.current;
7639
- const rowRenderKeys = useMemo(() => resolveRowRenderKeysById(rowKeyStore, deduplicatedMessages), [rowKeyStore, deduplicatedMessages]);
7660
+ const rowRenderKeys = useMemo(() => resolveRowRenderKeysById(rowKeyStore, renderedMessages), [rowKeyStore, renderedMessages]);
7640
7661
  useLayoutEffect(() => {
7641
- commitRowKeyStore(rowKeyStore, deduplicatedMessages);
7642
- }, [rowKeyStore, deduplicatedMessages]);
7662
+ commitRowKeyStore(rowKeyStore, renderedMessages);
7663
+ }, [rowKeyStore, renderedMessages]);
7643
7664
  if (process.env.NODE_ENV === "development" && deduplicatedMessages.length < messages.length) console.warn(`CopilotChatMessageView: Merged ${messages.length - deduplicatedMessages.length} message(s) with duplicate IDs.`);
7644
7665
  const { Component: AssistantComponent, slotProps: assistantSlotProps } = useMemo(() => resolveSlotComponent(assistantMessage, CopilotChatAssistantMessage_default), [assistantMessage]);
7645
7666
  const agentId = config?.agentId;
@@ -7673,7 +7694,18 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7673
7694
  useEffect(() => {
7674
7695
  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.");
7675
7696
  }, [scrollElementFromCtx]);
7676
- const shouldVirtualize = !!scrollElement && !children && deduplicatedMessages.length > VIRTUALIZE_THRESHOLD;
7697
+ const shouldVirtualize = !!scrollElement && !children && renderedMessages.length > VIRTUALIZE_THRESHOLD;
7698
+ const childrenDisabledVirtualization = !!children && !!scrollElement && renderedMessages.length > VIRTUALIZE_THRESHOLD;
7699
+ const warnedChildrenRef = useRef(false);
7700
+ useEffect(() => {
7701
+ if (process.env.NODE_ENV === "production" || !childrenDisabledVirtualization || warnedChildrenRef.current) return;
7702
+ warnedChildrenRef.current = true;
7703
+ console.warn(`[CopilotKit] CopilotChatMessageView: the \`children\` render prop disables virtualization, so all ${renderedMessages.length} messages are mounted. ` + (transformMessages ? "`transformMessages` keeps virtualization on by itself; drop `children` to use it." : "To reshape the list and keep virtualization, use `transformMessages` instead."));
7704
+ }, [
7705
+ childrenDisabledVirtualization,
7706
+ renderedMessages.length,
7707
+ transformMessages
7708
+ ]);
7677
7709
  const measuredRef = React.useRef({
7678
7710
  total: 0,
7679
7711
  sizes: /* @__PURE__ */ new Map()
@@ -7708,7 +7740,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7708
7740
  return item.start < (instance.scrollOffset ?? 0) + scrollAdjustments;
7709
7741
  }, []);
7710
7742
  const virtualizer = useVirtualizer({
7711
- count: shouldVirtualize ? deduplicatedMessages.length : 0,
7743
+ count: shouldVirtualize ? renderedMessages.length : 0,
7712
7744
  getScrollElement: () => scrollElement,
7713
7745
  estimateSize: estimateRowSize,
7714
7746
  overscan: 5,
@@ -7721,10 +7753,10 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7721
7753
  isPinnedToBottomRef.current = isPinnedToBottom;
7722
7754
  virtualizer.shouldAdjustScrollPositionOnItemSizeChange = shouldAdjustScrollOnResize;
7723
7755
  useLayoutEffect(() => {
7724
- if (!shouldVirtualize || !deduplicatedMessages.length) return;
7725
- virtualizer.scrollToIndex(deduplicatedMessages.length - 1, { align: "end" });
7756
+ if (!shouldVirtualize || !renderedMessages.length) return;
7757
+ virtualizer.scrollToIndex(renderedMessages.length - 1, { align: "end" });
7726
7758
  }, [shouldVirtualize, firstMessageId]);
7727
- const intelligenceTurnAnchors = useMemo(() => getIntelligenceTurnAnchors(deduplicatedMessages), [deduplicatedMessages]);
7759
+ const intelligenceTurnAnchors = useMemo(() => getIntelligenceTurnAnchors(deduplicatedMessages, renderedMessages), [deduplicatedMessages, renderedMessages]);
7728
7760
  const renderMessageBlock = (message) => {
7729
7761
  const elements = [];
7730
7762
  const stateSnapshot = renderCustomMessage ? getStateSnapshotForMessage(message.id) : void 0;
@@ -7739,6 +7771,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7739
7771
  message,
7740
7772
  messages,
7741
7773
  isRunning,
7774
+ isLatest: message.id === latestRenderedId,
7742
7775
  AssistantMessageComponent: AssistantComponent,
7743
7776
  slotProps: assistantSlotPropsWithFeedback
7744
7777
  }, rowKey));
@@ -7755,6 +7788,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7755
7788
  message,
7756
7789
  messages,
7757
7790
  isRunning,
7791
+ isLatest: message.id === latestRenderedId,
7758
7792
  ReasoningMessageComponent: ReasoningComponent,
7759
7793
  slotProps: reasoningSlotProps
7760
7794
  }, rowKey));
@@ -7772,7 +7806,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7772
7806
  }, `intelligence-${intelligenceTurnId}`));
7773
7807
  return elements.filter(Boolean);
7774
7808
  };
7775
- const messageElements = shouldVirtualize ? [] : deduplicatedMessages.flatMap(renderMessageBlock);
7809
+ const messageElements = shouldVirtualize ? [] : renderedMessages.flatMap(renderMessageBlock);
7776
7810
  if (children) return /* @__PURE__ */ jsx("div", {
7777
7811
  "data-copilotkit": true,
7778
7812
  style: { display: "contents" },
@@ -7783,7 +7817,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7783
7817
  interruptElement
7784
7818
  })
7785
7819
  });
7786
- const lastMessage = messages[messages.length - 1];
7820
+ const lastMessage = renderedMessages[renderedMessages.length - 1];
7787
7821
  const showCursor = isRunning && lastMessage?.role !== "reasoning";
7788
7822
  return /* @__PURE__ */ jsxs("div", {
7789
7823
  "data-copilotkit": true,
@@ -7797,7 +7831,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
7797
7831
  position: "relative"
7798
7832
  },
7799
7833
  children: virtualizer.getVirtualItems().map((virtualItem) => {
7800
- const message = deduplicatedMessages[virtualItem.index];
7834
+ const message = renderedMessages[virtualItem.index];
7801
7835
  return /* @__PURE__ */ jsx("div", {
7802
7836
  "data-index": virtualItem.index,
7803
7837
  ref: virtualizer.measureElement,
@@ -12548,4 +12582,4 @@ function validateProps(props) {
12548
12582
 
12549
12583
  //#endregion
12550
12584
  export { useAgentContext as $, ɵisRetryableMemoryStatus as $i, ResumeEntrySchema as $n, compactEvents as $r, BaseMessageSchema as $t, CopilotChatMessageView as A, parseSSEStream as Ai, MemoryError as An, ThinkingEndEventSchema as Ar, CopilotChatInput_default as At, CopilotChatAssistantMessage_default as B, tokenUsageFromLangChainMetadata as Bi, OutputCapabilitiesSchema as Bn, ToolCallSchema as Br, ActivityMessageSchema as Bt, CopilotModalHeader as C, ɵselectThreadsError$1 as Ca, ofType as Ci, InputContentDataSourceSchema as Cn, SuggestionEngine as Cr, useSandboxFunctions as Ct, CopilotChat as D, onInspectorViewThread$1 as Di, IntelligenceAgent as Dn, TextMessageContentEventSchema as Dr, ɵrunMcpFollowUp as Dt, DefaultOpenIcon as E, onInspectorStopViewing$1 as Ei, InputContentUrlSourceSchema as En, TextMessageChunkEventSchema as Er, MCPAppsActivityType as Et, CopilotChatSuggestionView as F, resolveDebugLogger as Fi, MultiAgentCapabilitiesSchema as Fn, TokenUsageSchema as Fr, AGUIConnectNotImplementedError$1 as Ft, useLearnFromUserActionInCurrentThread as G, ɵInterruptState$1 as Gi, ReasoningEncryptedValueSubtypeSchema as Gn, ToolsCapabilitiesSchema as Gr, AssistantMessageSchema as Gt, useLearningContainersInCurrentThread as H, transformHttpEventStream as Hi, RawEventSchema as Hn, ToolCallStatus$1 as Hr, AgentCapabilitiesSchema as Ht, CopilotChatSuggestionPill as I, runHttpRequest as Ii, MultimodalCapabilitiesSchema as In, ToolCallArgsEventSchema as Ir, AGUIError as It, useThreads$1 as J, ɵTHREAD_REQUEST_TIMEOUT_MS as Ji, ReasoningMessageContentEventSchema as Jn, VideoInputContentSchema as Jr, BackwardCompatibility_0_0_39 as Jt, useLearnFromUserAction as K, ɵMAX_SOCKET_RETRIES as Ki, ReasoningEndEventSchema as Kn, TransportCapabilitiesSchema as Kr, AudioInputContentSchema as Kt, CopilotChatReasoningMessage_default as L, select as Li, MultimodalInputCapabilitiesSchema as Ln, ToolCallChunkEventSchema as Lr, AGUI_METADATA_KEY as Lt, IntelligenceIndicator as M, props as Mi, MessagesSnapshotEventSchema as Mn, ThinkingTextMessageContentEventSchema as Mr, CopilotChatAudioRecorder as Mt, getIntelligenceTurnAnchors as N, randomUUID$2 as Ni, MetadataSchema as Nn, ThinkingTextMessageEndEventSchema as Nr, CopilotChatConfigurationProvider as Nt, CopilotChatView_default as O, onInspectorViewThreadResult as Oi, InterruptSchema as On, TextMessageEndEventSchema as Or, CopilotKitInspector as Ot, IntelligenceIndicatorView as P, resolveAgentDebugConfig as Pi, Middleware as Pn, ThinkingTextMessageStartEventSchema as Pr, useCopilotChatConfiguration as Pt, useSuggestions as Q, ɵisCopilotKitFeature as Qi, ReasoningStartEventSchema as Qn, buildResumeArray as Qr, BaseEventSchema as Qt, CopilotChatUserMessage_default as R, structuredClone_ as Ri, MultimodalOutputCapabilitiesSchema as Rn, ToolCallEndEventSchema as Rr, AbstractAgent$1 as Rt, CopilotSidebarView as S, ɵselectThreads$1 as Sa, mergeMetadata as Si, ImageInputPartSchema as Sn, SubagentStartedEventSchema as Sr, SandboxFunctionsContext as St, DefaultCloseIcon as T, ɵthreadAdapterEvents as Ta, onInspectorActiveThread as Ti, InputContentSourceSchema as Tn, TextInputContentSchema as Tr, MCPAppsActivityRenderer as Tt, useLearningContainers as U, verifyEvents as Ui, ReasoningCapabilitiesSchema as Un, ToolMessageSchema as Ur, AgentRegistry as Ut, CopilotChatToolCallsView as V, transformChunks as Vi, ProxiedCopilotRuntimeAgent$1 as Vn, ToolCallStartEventSchema as Vr, ActivitySnapshotEventSchema as Vt, useAttachments as W, ɵCOPILOTKIT_FEATURES as Wi, ReasoningEncryptedValueEventSchema as Wn, ToolSchema as Wr, AgentThreadLockedError as Wt, INTERRUPT_EVENT_NAME as X, ɵcreateThreadSelectors as Xi, ReasoningMessageSchema as Xn, WebMCPRegistry as Xr, BackwardCompatibility_0_0_47 as Xt, useInterrupt as Y, ɵcreateMemoryStore as Yi, ReasoningMessageEndEventSchema as Yn, VideoInputPartSchema as Yr, BackwardCompatibility_0_0_45 as Yt, useConfigureSuggestions as Z, ɵcreateThreadStore$1 as Zi, ReasoningMessageStartEventSchema as Zn, aggregateTokenUsage as Zr, BackwardCompatibility_0_0_57 as Zt, WildcardToolCallRender as _, ɵselectMemoriesAvailable$1 as _a, getWebMCPModelContext as _i, HttpAgent$1 as _n, SubagentErrorEventSchema as _r, GenerateSandboxedUiArgsSchema as _t, ThreadsProvider as a, ɵmemoryRestEvents as aa, createInspectorThreadRequestId as ai, CopilotKitCoreRuntimeConnectionStatus$1 as an, RunFinishedOutcomeSchema as ar, useRenderTool as at, CopilotSidebar as b, ɵselectMemoriesIsMutating as ba, isInterruptExpired as bi, IdentityCapabilitiesSchema as bn, SubagentFinishedSuccessOutcomeSchema as br, OpenGenerativeUIContentSchema as bt, CoAgentStateRendersProvider as c, ɵobservePhoenixSocketHealth$ as ca, createStore as ci, DeveloperMessageSchema as cn, RunStartedEventSchema as cr, useFrontendTool as ct, shouldShowDevConsole as d, ɵphoenixSocket$ as da, emitInspectorStopViewing as di, EventSchemas as dn, StateManager as dr, CopilotKitProvider as dt, ɵjoinPhoenixChannel$ as ea, completePartialMarkdown as ei, BinaryInputContentSchema as en, RoleSchema as er, useCapabilities as et, useToast as f, ɵselectFetchMoreError$1 as fa, emitInspectorViewThread as fi, EventType as fn, StateSchema as fr, useCopilotKit$1 as ft, useCopilotContext as g, ɵselectMemories$1 as ga, getRunOutcome as gi, FunctionMiddleware as gn, SubAgentInfoSchema as gr, createA2UIMessageRenderer as gt, CopilotContext as h, ɵselectIsMutating$1 as ha, ensureObjectArgs as hi, FunctionCallSchema as hn, StepStartedEventSchema as hr, defineToolCallRenderer as ht, ThreadsContext as i, ɵmemoryReducer as ia, createEffect as ii, CopilotKitCoreErrorCode$1 as in, RunFinishedInterruptOutcomeSchema as ir, useDefaultRenderTool as it, INTELLIGENCE_TURN_HEAD as j, parseToolArguments as ji, MessageSchema as jn, ThinkingStartEventSchema as jr, AudioRecorderError as jt, CopilotChatAttachmentQueue as k, parseProtoStream as ki, MEMORY_ERROR_REGISTRY as kn, TextMessageStartEventSchema as kr, useRenderToolCall as kt, useCoAgentStateRenders as l, ɵobservePhoenixSocketSignals$ as la, defaultApplyEvents as li, DocumentInputContentSchema as ln, StateCapabilitiesSchema as lr, useRenderActivityMessage as lt, useCopilotMessagesContext as m, ɵselectIsFetchingNextPage$1 as ma, empty as mi, FilterToolCallsMiddleware as mn, StepFinishedEventSchema as mr, CopilotKitCoreReact as mt, defaultCopilotContextCategories as n, ɵmemoryAdapterEvents as na, createActionGroup as ni, ContextStore as nn, RunErrorEventSchema as nr, useAgent as nt, useThreads as o, ɵobservePhoenixEvent$ as oa, createReducer as oi, CustomEventSchema as on, RunFinishedSuccessOutcomeSchema as or, useComponent as ot, CopilotMessagesContext as p, ɵselectHasNextPage$1 as pa, emitInspectorViewThreadResult$1 as pi, ExecutionCapabilitiesSchema as pn, StateSnapshotEventSchema as pr, useLicenseContext$1 as pt, useMemories as q, ɵRUNTIME_PROBE_TIMEOUT_MS as qi, ReasoningMessageChunkEventSchema as qn, UserMessageSchema as qr, AudioInputPartSchema as qt, CoAgentStateRenderBridge as r, ɵmemoryDomainEvents as ra, createDebugLogger as ri, CopilotKitCore$1 as rn, RunFinishedEventSchema as rr, useHumanInTheLoop as rt, CoAgentStateRendersContext as s, ɵobservePhoenixJoinOutcome$ as sa, createSelector as si, DebugLogger as sn, RunHandler as sr, useFrontendTools as st, CopilotKit as t, ɵmapMemoryMetadataEvent as ta, convertToLegacyEvents as ti, ContextSchema as tn, RunAgentInputSchema as tr, UseAgentUpdate as tt, useAsyncCallback as u, ɵphoenixChannel$ as ua, emitInspectorActiveThread$1 as ui, DocumentInputPartSchema as un, StateDeltaEventSchema as ur, useRenderCustomMessages as ut, CopilotThreadsDrawer as v, ɵselectMemoriesError$1 as va, isAbortError as vi, HumanInTheLoopCapabilitiesSchema as vn, SubagentFinishedEventSchema as vr, OpenGenerativeUIActivityRenderer as vt, CopilotChatToggleButton as w, ɵselectThreadsIsLoading$1 as wa, on as wi, InputContentSchema as wn, SystemMessageSchema as wr, MCPAppsActivityContentSchema as wt, CopilotPopupView as x, ɵselectMemoriesRealtimeStatus$1 as xa, isRunCompletionAware$1 as xi, ImageInputContentSchema as xn, SubagentFinishedSuspendedOutcomeSchema as xr, OpenGenerativeUIToolRenderer as xt, CopilotPopup as y, ɵselectMemoriesIsLoading$1 as ya, isInspectorThreadBridgeEnabled$1 as yi, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID as yn, SubagentFinishedOutcomeSchema as yr, OpenGenerativeUIActivityType as yt, CopilotChatAttachmentRenderer as z, tokenUsageFromAiSdkUsage as zi, OptionalMetadataSchema as zn, ToolCallResultEventSchema as zr, ActivityDeltaEventSchema as zt };
12551
- //# sourceMappingURL=copilotkit-DyZh7EH4.mjs.map
12585
+ //# sourceMappingURL=copilotkit-CoWG8EAX.mjs.map