@copilotkit/react-core 1.73.0 → 1.73.2-canary.1790068297

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-tkBlMrXl.cjs');
4
+ const require_copilotkit = require('./copilotkit-D_c2dJ9t.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { $n as LangGraphInterruptAction, Cr as CatchAllFrontendAction, Er as RenderFunctionStatus, Jn as CopilotApiConfig, Qn as CoAgentStateRender, Sr as CatchAllActionRenderPropsWait, Tr as FrontendActionAvailability, X as useAgent, Xn as CopilotContextParams, Yn as CopilotContext, Zn as useCopilotContext, _r as ActionRenderProps, ar as QueuedInterruptEvent, br as ActionRenderPropsWait, bt as useRenderToolCall$1, cr as CrewsResponseStatus, dr as CrewsToolStateItem, er as LangGraphInterruptActionSetter, fr as CopilotChatSuggestionConfiguration, gr as TreeNode, hr as Tree, ir as LangGraphInterruptRenderProps, lr as CrewsStateItem, mr as DocumentPointer, n as defaultCopilotContextCategories, nr as LangGraphInterruptRender, or as CrewsAgentState, pr as SystemMessageFunction, qn as CoagentInChatRenderFunction, r as CopilotKitProps, rr as LangGraphInterruptRenderHandlerProps, sr as CrewsResponse, t as CopilotKit, tr as LangGraphInterruptActionSetterArgs, ur as CrewsTaskStateItem, vr as ActionRenderPropsNoArgs, wr as FrontendAction, xr as CatchAllActionRenderProps, yr as ActionRenderPropsNoArgsWait } from "./copilotkit-BGQqqxCI.cjs";
1
+ import { Ad as ActionRenderPropsNoArgs, Cd as CrewsToolStateItem, Dd as Tree, Ed as DocumentPointer, Fd as CatchAllFrontendAction, Id as FrontendAction, Ld as FrontendActionAvailability, Md as ActionRenderPropsWait, Nd as CatchAllActionRenderProps, Od as TreeNode, Pd as CatchAllActionRenderPropsWait, Rd as RenderFunctionStatus, Sd as CrewsTaskStateItem, Td as SystemMessageFunction, X as useAgent, _d as QueuedInterruptEvent, ad as CoagentInChatRenderFunction, bd as CrewsResponseStatus, cd as CopilotContextParams, dd as LangGraphInterruptAction, fd as LangGraphInterruptActionSetter, gd as LangGraphInterruptRenderProps, hd as LangGraphInterruptRenderHandlerProps, jd as ActionRenderPropsNoArgsWait, kd as ActionRenderProps, ld as useCopilotContext, md as LangGraphInterruptRender, n as defaultCopilotContextCategories, od as CopilotApiConfig, pd as LangGraphInterruptActionSetterArgs, r as CopilotKitProps, sd as CopilotContext, t as CopilotKit, ud as CoAgentStateRender, vd as CrewsAgentState, wd as CopilotChatSuggestionConfiguration, xd as CrewsStateItem, xt as useRenderToolCall$1, yd as CrewsResponse } from "./copilotkit-C7c_w9iV.cjs";
2
2
  import "./v2/index.cjs";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { CopilotRuntimeClient, CopilotRuntimeClientOptions, ForwardedParametersInput, Message } from "@copilotkit/runtime-client-gql";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $n as LangGraphInterruptAction, Cr as CatchAllFrontendAction, Er as RenderFunctionStatus, Jn as CopilotApiConfig, Qn as CoAgentStateRender, Sr as CatchAllActionRenderPropsWait, Tr as FrontendActionAvailability, X as useAgent, Xn as CopilotContextParams, Yn as CopilotContext, Zn as useCopilotContext, _r as ActionRenderProps, ar as QueuedInterruptEvent, br as ActionRenderPropsWait, bt as useRenderToolCall$1, cr as CrewsResponseStatus, dr as CrewsToolStateItem, er as LangGraphInterruptActionSetter, fr as CopilotChatSuggestionConfiguration, gr as TreeNode, hr as Tree, ir as LangGraphInterruptRenderProps, lr as CrewsStateItem, mr as DocumentPointer, n as defaultCopilotContextCategories, nr as LangGraphInterruptRender, or as CrewsAgentState, pr as SystemMessageFunction, qn as CoagentInChatRenderFunction, r as CopilotKitProps, rr as LangGraphInterruptRenderHandlerProps, sr as CrewsResponse, t as CopilotKit, tr as LangGraphInterruptActionSetterArgs, ur as CrewsTaskStateItem, vr as ActionRenderPropsNoArgs, wr as FrontendAction, xr as CatchAllActionRenderProps, yr as ActionRenderPropsNoArgsWait } from "./copilotkit-D_gK4yKD.mjs";
1
+ import { Ad as ActionRenderPropsNoArgs, Cd as CrewsToolStateItem, Dd as Tree, Ed as DocumentPointer, Fd as CatchAllFrontendAction, Id as FrontendAction, Ld as FrontendActionAvailability, Md as ActionRenderPropsWait, Nd as CatchAllActionRenderProps, Od as TreeNode, Pd as CatchAllActionRenderPropsWait, Rd as RenderFunctionStatus, Sd as CrewsTaskStateItem, Td as SystemMessageFunction, X as useAgent, _d as QueuedInterruptEvent, ad as CoagentInChatRenderFunction, bd as CrewsResponseStatus, cd as CopilotContextParams, dd as LangGraphInterruptAction, fd as LangGraphInterruptActionSetter, gd as LangGraphInterruptRenderProps, hd as LangGraphInterruptRenderHandlerProps, jd as ActionRenderPropsNoArgsWait, kd as ActionRenderProps, ld as useCopilotContext, md as LangGraphInterruptRender, n as defaultCopilotContextCategories, od as CopilotApiConfig, pd as LangGraphInterruptActionSetterArgs, r as CopilotKitProps, sd as CopilotContext, t as CopilotKit, ud as CoAgentStateRender, vd as CrewsAgentState, wd as CopilotChatSuggestionConfiguration, xd as CrewsStateItem, xt as useRenderToolCall$1, yd as CrewsResponse } from "./copilotkit-CfyJ1-Nx.mjs";
2
2
  import "./v2/index.mjs";
3
3
  import React, { ReactNode, RefObject, SetStateAction } from "react";
4
4
  import { StaticSuggestionsConfig, Suggestion } from "@copilotkit/core";
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { Nt as useCopilotChatConfiguration, Ot as useRenderToolCall$1, Q as useSuggestions, X as INTERRUPT_EVENT_NAME, Y as useInterrupt, Z as useConfigureSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, d as shouldShowDevConsole, dt as useCopilotKit, f as useToast, g as useCopilotContext, h as CopilotContext, i as ThreadsContext, l as useCoAgentStateRenders, lt as useRenderCustomMessages, m as useCopilotMessagesContext, mt as defineToolCallRenderer, n as defaultCopilotContextCategories, nt as useAgent, o as useThreads, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, rt as useHumanInTheLoop$1, s as CoAgentStateRendersContext, st as useFrontendTool$1, t as CopilotKit, u as useAsyncCallback } from "./copilotkit-BkeaNR3A.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-CwVE-0JG.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
@@ -2211,7 +2211,7 @@ react_markdown = __toESM(react_markdown);
2211
2211
  }, [value, warningMessage]);
2212
2212
  return value;
2213
2213
  }
2214
- const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, useSingleEndpoint, onError, a2ui, defaultThrottleMs, debug }) => {
2214
+ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, useSingleEndpoint, onError, a2ui, defaultThrottleMs, debug }) => {
2215
2215
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
2216
2216
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
2217
2217
  (0, react.useEffect)(() => {
@@ -2332,6 +2332,7 @@ react_markdown = __toESM(react_markdown);
2332
2332
  const processedRenderToolCalls = [];
2333
2333
  humanInTheLoopList.forEach((tool) => {
2334
2334
  const frontendTool = {
2335
+ type: "human-in-the-loop",
2335
2336
  name: tool.name,
2336
2337
  description: tool.description,
2337
2338
  parameters: tool.parameters,
@@ -2438,6 +2439,7 @@ react_markdown = __toESM(react_markdown);
2438
2439
  runtimeTransport: useSingleEndpoint === true ? "single" : useSingleEndpoint === false ? "rest" : "auto",
2439
2440
  headers: mergedHeaders,
2440
2441
  credentials,
2442
+ messageFilter,
2441
2443
  properties,
2442
2444
  agents__unsafe_dev_only: mergedAgents,
2443
2445
  tools: allTools,
@@ -2523,6 +2525,9 @@ react_markdown = __toESM(react_markdown);
2523
2525
  subscription.unsubscribe();
2524
2526
  };
2525
2527
  }, [copilotkit]);
2528
+ (0, react.useEffect)(() => {
2529
+ copilotkit.setMessageFilter(messageFilter);
2530
+ }, [copilotkit, messageFilter]);
2526
2531
  (0, react.useEffect)(() => {
2527
2532
  copilotkit.setRuntimeUrl(chatApiEndpoint);
2528
2533
  copilotkit.setRuntimeTransport(useSingleEndpoint === true ? "single" : useSingleEndpoint === false ? "rest" : "auto");
@@ -2820,6 +2825,7 @@ react_markdown = __toESM(react_markdown);
2820
2825
  ]);
2821
2826
  useFrontendTool$1({
2822
2827
  ...tool,
2828
+ type: "human-in-the-loop",
2823
2829
  handler,
2824
2830
  render: RenderComponent
2825
2831
  }, deps);