@copilotkit/react-core 1.56.5-canary.1778052912 → 1.56.5-canary.1778068503

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/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-CkhjqPU3.cjs');
4
+ const require_copilotkit = require('./copilotkit-XGd8L2jL.cjs');
5
5
  let react = require("react");
6
6
  react = require_copilotkit.__toESM(react);
7
7
  let _copilotkit_core = require("@copilotkit/core");
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { $ as useRenderToolCall$1, B as useInterrupt, G as useAgent, H as useSuggestions, K as useHumanInTheLoop$1, Q as useRenderCustomMessages, V as useConfigureSuggestions, X as useFrontendTool$1, a as ThreadsProvider, c as CoAgentStateRendersProvider, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, gt as useCopilotChatConfiguration, h as CopilotContext, i as ThreadsContext, it as defineToolCallRenderer, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, o as useThreads, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useCopilotKit, u as useAsyncCallback } from "./copilotkit-mJjSHUFd.mjs";
3
+ import { $ as useRenderToolCall$1, B as useInterrupt, G as useAgent, H as useSuggestions, K as useHumanInTheLoop$1, Q as useRenderCustomMessages, V as useConfigureSuggestions, X as useFrontendTool$1, a as ThreadsProvider, c as CoAgentStateRendersProvider, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, gt as useCopilotChatConfiguration, h as CopilotContext, i as ThreadsContext, it as defineToolCallRenderer, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, o as useThreads, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useCopilotKit, u as useAsyncCallback } from "./copilotkit-DhuXdtE1.mjs";
4
4
  import React, { Fragment, createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
5
5
  import { CopilotKitCoreRuntimeConnectionStatus, ToolCallStatus } from "@copilotkit/core";
6
6
  import { AGUIConnectNotImplementedError, HttpAgent } from "@ag-ui/client";
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-CkhjqPU3.cjs');
4
+ const require_copilotkit = require('../copilotkit-XGd8L2jL.cjs');
5
5
  require("./index.css");
6
6
  let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
7
7
 
package/dist/v2/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { $ as useRenderToolCall, A as IntelligenceIndicator, B as useInterrupt, C as CopilotChatToggleButton, D as CopilotChatView_default, E as CopilotChat, F as CopilotChatAttachmentRenderer, G as useAgent, H as useSuggestions, I as CopilotChatAssistantMessage_default, J as useRenderTool, K as useHumanInTheLoop, L as CopilotChatToolCallsView, M as CopilotChatSuggestionPill, N as CopilotChatReasoningMessage_default, O as CopilotChatAttachmentQueue, P as CopilotChatUserMessage_default, Q as useRenderCustomMessages, R as useAttachments, S as CopilotModalHeader, T as DefaultOpenIcon, U as useCapabilities, V as useConfigureSuggestions, W as UseAgentUpdate, X as useFrontendTool, Y as useComponent, Z as useRenderActivityMessage, _ as WildcardToolCallRender, at as createA2UIMessageRenderer, b as CopilotPopupView, ct as MCPAppsActivityContentSchema, dt as CopilotKitInspector, et as CopilotKitProvider, ft as CopilotChatInput_default, gt as useCopilotChatConfiguration, ht as CopilotChatConfigurationProvider, it as defineToolCallRenderer, j as CopilotChatSuggestionView, k as CopilotChatMessageView, lt as MCPAppsActivityRenderer, mt as CopilotChatAudioRecorder, nt as CopilotKitCoreReact, ot as SandboxFunctionsContext, pt as AudioRecorderError, q as useDefaultRenderTool, rt as useAgentContext, st as useSandboxFunctions, t as CopilotKit, tt as useCopilotKit, ut as MCPAppsActivityType, v as CopilotPopup, w as DefaultCloseIcon, x as CopilotSidebarView, y as CopilotSidebar, z as useThreads } from "../copilotkit-mJjSHUFd.mjs";
3
+ import { $ as useRenderToolCall, A as IntelligenceIndicator, B as useInterrupt, C as CopilotChatToggleButton, D as CopilotChatView_default, E as CopilotChat, F as CopilotChatAttachmentRenderer, G as useAgent, H as useSuggestions, I as CopilotChatAssistantMessage_default, J as useRenderTool, K as useHumanInTheLoop, L as CopilotChatToolCallsView, M as CopilotChatSuggestionPill, N as CopilotChatReasoningMessage_default, O as CopilotChatAttachmentQueue, P as CopilotChatUserMessage_default, Q as useRenderCustomMessages, R as useAttachments, S as CopilotModalHeader, T as DefaultOpenIcon, U as useCapabilities, V as useConfigureSuggestions, W as UseAgentUpdate, X as useFrontendTool, Y as useComponent, Z as useRenderActivityMessage, _ as WildcardToolCallRender, at as createA2UIMessageRenderer, b as CopilotPopupView, ct as MCPAppsActivityContentSchema, dt as CopilotKitInspector, et as CopilotKitProvider, ft as CopilotChatInput_default, gt as useCopilotChatConfiguration, ht as CopilotChatConfigurationProvider, it as defineToolCallRenderer, j as CopilotChatSuggestionView, k as CopilotChatMessageView, lt as MCPAppsActivityRenderer, mt as CopilotChatAudioRecorder, nt as CopilotKitCoreReact, ot as SandboxFunctionsContext, pt as AudioRecorderError, q as useDefaultRenderTool, rt as useAgentContext, st as useSandboxFunctions, t as CopilotKit, tt as useCopilotKit, ut as MCPAppsActivityType, v as CopilotPopup, w as DefaultCloseIcon, x as CopilotSidebarView, y as CopilotSidebar, z as useThreads } from "../copilotkit-DhuXdtE1.mjs";
4
4
  import "./index.css";
5
5
  import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
6
6
 
@@ -6011,9 +6011,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6011
6011
  if (prevProps.message.content !== nextProps.message.content) return false;
6012
6012
  if (prevProps.message.role !== nextProps.message.role) return false;
6013
6013
  if (JSON.stringify(prevProps.stateSnapshot) !== JSON.stringify(nextProps.stateSnapshot)) return false;
6014
- if (prevProps.numberOfMessagesInRun !== nextProps.numberOfMessagesInRun) return false;
6015
- if (prevProps.isInLatestRun !== nextProps.isInLatestRun) return false;
6016
- if (nextProps.isInLatestRun && prevProps.isRunning !== nextProps.isRunning) return false;
6017
6014
  return true;
6018
6015
  });
6019
6016
  /**
@@ -6071,37 +6068,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6071
6068
  } });
6072
6069
  return () => subscription.unsubscribe();
6073
6070
  }, [copilotkit]);
6074
- const runMetadata = (0, react.useMemo)(() => {
6075
- if (!config) return null;
6076
- const runIdByMessageId = /* @__PURE__ */ new Map();
6077
- for (const msg of messages) {
6078
- const r = copilotkit.getRunIdForMessage(config.agentId, config.threadId, msg.id);
6079
- if (r) runIdByMessageId.set(msg.id, r);
6080
- }
6081
- const countByRunId = /* @__PURE__ */ new Map();
6082
- for (const r of runIdByMessageId.values()) {
6083
- var _countByRunId$get;
6084
- countByRunId.set(r, ((_countByRunId$get = countByRunId.get(r)) !== null && _countByRunId$get !== void 0 ? _countByRunId$get : 0) + 1);
6085
- }
6086
- let latestRunId;
6087
- for (let i = messages.length - 1; i >= 0; i--) {
6088
- const r = runIdByMessageId.get(messages[i].id);
6089
- if (r) {
6090
- latestRunId = r;
6091
- break;
6092
- }
6093
- }
6094
- return {
6095
- runIdByMessageId,
6096
- countByRunId,
6097
- latestRunId
6098
- };
6099
- }, [
6100
- messages,
6101
- config === null || config === void 0 ? void 0 : config.agentId,
6102
- config === null || config === void 0 ? void 0 : config.threadId,
6103
- copilotkit
6104
- ]);
6105
6071
  const getStateSnapshotForMessage = (messageId) => {
6106
6072
  var _copilotkit$getRunIdF;
6107
6073
  if (!config) return void 0;
@@ -6141,17 +6107,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6141
6107
  const renderMessageBlock = (message) => {
6142
6108
  const elements = [];
6143
6109
  const stateSnapshot = getStateSnapshotForMessage(message.id);
6144
- const messageRunId = runMetadata === null || runMetadata === void 0 ? void 0 : runMetadata.runIdByMessageId.get(message.id);
6145
- const numberOfMessagesInRun = messageRunId ? runMetadata === null || runMetadata === void 0 ? void 0 : runMetadata.countByRunId.get(messageRunId) : void 0;
6146
- const isInLatestRun = messageRunId === void 0 ? void 0 : messageRunId === (runMetadata === null || runMetadata === void 0 ? void 0 : runMetadata.latestRunId);
6147
6110
  if (renderCustomMessage) elements.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedCustomMessage, {
6148
6111
  message,
6149
6112
  position: "before",
6150
6113
  renderCustomMessage,
6151
- stateSnapshot,
6152
- numberOfMessagesInRun,
6153
- isInLatestRun,
6154
- isRunning
6114
+ stateSnapshot
6155
6115
  }, `${message.id}-custom-before`));
6156
6116
  if (message.role === "assistant") elements.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedAssistantMessage, {
6157
6117
  message,
@@ -6180,10 +6140,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6180
6140
  message,
6181
6141
  position: "after",
6182
6142
  renderCustomMessage,
6183
- stateSnapshot,
6184
- numberOfMessagesInRun,
6185
- isInLatestRun,
6186
- isRunning
6143
+ stateSnapshot
6187
6144
  }, `${message.id}-custom-after`));
6188
6145
  if (copilotkit.intelligence !== void 0 && message.role === "assistant") {
6189
6146
  var _config$agentId;