@copilotkit/react-core 1.73.3 → 1.74.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/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-D_c2dJ9t.cjs');
4
+ const require_copilotkit = require('./copilotkit-C5FS3iDK.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 { Pt as useCopilotChatConfiguration, Q as useSuggestions, X as INTERRUPT_EVENT_NAME, Y as useInterrupt, Z as useConfigureSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useFrontendTool$1, d as shouldShowDevConsole, f as useToast, ft as useCopilotKit, g as useCopilotContext, h as CopilotContext, ht as defineToolCallRenderer, i as ThreadsContext, kt as useRenderToolCall$1, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useAgent, o as useThreads, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, rt as useHumanInTheLoop$1, s as CoAgentStateRendersContext, t as CopilotKit, u as useAsyncCallback, ut as useRenderCustomMessages } from "./copilotkit-CwVE-0JG.mjs";
3
+ import { Pt as useCopilotChatConfiguration, Q as useSuggestions, X as INTERRUPT_EVENT_NAME, Y as useInterrupt, Z as useConfigureSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useFrontendTool$1, d as shouldShowDevConsole, f as useToast, ft as useCopilotKit, g as useCopilotContext, h as CopilotContext, ht as defineToolCallRenderer, i as ThreadsContext, kt as useRenderToolCall$1, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useAgent, o as useThreads, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, rt as useHumanInTheLoop$1, s as CoAgentStateRendersContext, t as CopilotKit, u as useAsyncCallback, ut as useRenderCustomMessages } from "./copilotkit-DyZh7EH4.mjs";
4
4
  import React, { Fragment, createElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
5
  import { CopilotKitCoreRuntimeConnectionStatus, ToolCallStatus } from "@copilotkit/core";
6
6
  import { AGUIConnectNotImplementedError, HttpAgent } from "@ag-ui/client";
package/dist/index.umd.js CHANGED
@@ -581,6 +581,10 @@ react_markdown = __toESM(react_markdown);
581
581
  return renderToolCall;
582
582
  }
583
583
 
584
+ //#endregion
585
+ //#region package.json
586
+ var version = "1.74.0";
587
+
584
588
  //#endregion
585
589
  //#region src/v2/components/CopilotKitInspector.tsx
586
590
  const CopilotKitInspector = ({ core, openRequest, onVisibilityChange }) => {
@@ -603,7 +607,11 @@ react_markdown = __toESM(react_markdown);
603
607
  if (!mounted || !mountRef.current) return;
604
608
  mod.defineWebInspector?.();
605
609
  inspector = mountRef.current.ownerDocument.createElement(mod.WEB_INSPECTOR_TAG);
606
- mod.configureWebInspectorElement(inspector, latestCoreRef.current);
610
+ mod.configureWebInspectorElement(inspector, latestCoreRef.current, {
611
+ development: process.env.NODE_ENV === "development",
612
+ framework: "react",
613
+ sdkVersion: version
614
+ });
607
615
  inspector.addEventListener("cpk-inspector-visibility-change", handleVisibilityChange);
608
616
  mountRef.current.appendChild(inspector);
609
617
  inspectorRef.current = inspector;
@@ -2680,8 +2688,8 @@ react_markdown = __toESM(react_markdown);
2680
2688
  if (aHasAgent === (b.agentId !== void 0)) return 0;
2681
2689
  return aHasAgent ? -1 : 1;
2682
2690
  });
2691
+ if (!customMessageRenderers.length) return null;
2683
2692
  return function(params) {
2684
- if (!customMessageRenderers.length) return null;
2685
2693
  const { message, position } = params;
2686
2694
  const resolvedRunId = copilotkit.getRunIdForMessage(agentId, threadId, message.id) ?? copilotkit.getRunIdsForThread(agentId, threadId).slice(-1)[0];
2687
2695
  const runId = resolvedRunId ?? `missing-run-id:${message.id}`;