@copilotkit/react-core 1.73.0 → 1.73.1
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/{copilotkit-BGQqqxCI.d.cts → copilotkit-C7c_w9iV.d.cts} +83 -4
- package/dist/copilotkit-C7c_w9iV.d.cts.map +1 -0
- package/dist/{copilotkit-D_gK4yKD.d.mts → copilotkit-CfyJ1-Nx.d.mts} +83 -4
- package/dist/copilotkit-CfyJ1-Nx.d.mts.map +1 -0
- package/dist/{copilotkit-BkeaNR3A.mjs → copilotkit-CwVE-0JG.mjs} +127 -23
- package/dist/copilotkit-CwVE-0JG.mjs.map +1 -0
- package/dist/{copilotkit-tkBlMrXl.cjs → copilotkit-D_c2dJ9t.cjs} +129 -19
- package/dist/copilotkit-D_c2dJ9t.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +7 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +101 -2
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +53 -1
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +53 -1
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +101 -3
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1285 -55
- package/dist/v2/index.d.cts +2 -4
- package/dist/v2/index.d.mts +2 -4
- package/dist/v2/index.mjs +2 -6
- package/dist/v2/index.umd.js +1384 -51
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +12 -11
- package/dist/copilotkit-BGQqqxCI.d.cts.map +0 -1
- package/dist/copilotkit-BkeaNR3A.mjs.map +0 -1
- package/dist/copilotkit-D_gK4yKD.d.mts.map +0 -1
- package/dist/copilotkit-tkBlMrXl.cjs.map +0 -1
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-
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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);
|