@copilotkit/react-core 1.70.3 → 1.71.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-BU3OvveB.cjs → copilotkit-BkVEkUS0.cjs} +369 -154
- package/dist/copilotkit-BkVEkUS0.cjs.map +1 -0
- package/dist/{copilotkit-Bs98akp9.d.mts → copilotkit-ChjzWqn6.d.mts} +33 -8
- package/dist/copilotkit-ChjzWqn6.d.mts.map +1 -0
- package/dist/{copilotkit-Ap_yisA5.mjs → copilotkit-D5BTo0YG.mjs} +368 -153
- package/dist/copilotkit-D5BTo0YG.mjs.map +1 -0
- package/dist/{copilotkit-X2eGbOwf.d.cts → copilotkit-DCIXZawe.d.cts} +33 -8
- package/dist/copilotkit-DCIXZawe.d.cts.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +180 -139
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/context.cjs +4 -0
- package/dist/v2/context.cjs.map +1 -1
- package/dist/v2/context.d.cts +3 -1
- package/dist/v2/context.d.cts.map +1 -1
- package/dist/v2/context.d.mts +3 -1
- package/dist/v2/context.d.mts.map +1 -1
- package/dist/v2/context.mjs +3 -1
- package/dist/v2/context.mjs.map +1 -1
- package/dist/v2/headless.cjs +20 -5
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +9 -4
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +9 -4
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +21 -6
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +1 -1
- package/dist/v2/index.d.mts +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +495 -278
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -9
- package/dist/copilotkit-Ap_yisA5.mjs.map +0 -1
- package/dist/copilotkit-BU3OvveB.cjs.map +0 -1
- package/dist/copilotkit-Bs98akp9.d.mts.map +0 -1
- package/dist/copilotkit-X2eGbOwf.d.cts.map +0 -1
- package/skills/react-core/SKILL.md +0 -110
- package/skills/react-core/references/agent-access.md +0 -355
- package/skills/react-core/references/attachments.md +0 -311
- package/skills/react-core/references/capabilities.md +0 -138
- package/skills/react-core/references/chat-components.md +0 -229
- package/skills/react-core/references/client-side-tools.md +0 -358
- package/skills/react-core/references/custom-message-renderers.md +0 -223
- package/skills/react-core/references/debug-mode.md +0 -140
- package/skills/react-core/references/human-in-the-loop.md +0 -312
- package/skills/react-core/references/provider-setup.md +0 -358
- package/skills/react-core/references/rendering-activity-messages.md +0 -201
- package/skills/react-core/references/rendering-tool-calls.md +0 -319
- package/skills/react-core/references/suggestions.md +0 -211
- package/skills/react-core/references/switching-agents-recipes.md +0 -161
- package/skills/react-core/references/switching-agents.md +0 -240
- package/skills/react-core/references/threads.md +0 -289
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-
|
|
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-DCIXZawe.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-
|
|
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-ChjzWqn6.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,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import React, { Fragment, createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
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-D5BTo0YG.mjs";
|
|
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";
|
|
7
7
|
import { CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitRemoteEndpointDiscoveryError, ErrorVisibility, Severity, actionParametersToJsonSchema, getZodParameters, parseJson, randomId, styledConsole } from "@copilotkit/shared";
|
|
@@ -1019,7 +1019,7 @@ function useCopilotAction(action, dependencies) {
|
|
|
1019
1019
|
*
|
|
1020
1020
|
* ### Example
|
|
1021
1021
|
* A great example of this is in our Perplexity Clone where we render the progress of an agent's internet search as it is happening.
|
|
1022
|
-
* You can play around with it below or learn how to build it with
|
|
1022
|
+
* You can play around with it below or learn how to build it with the [state rendering guide](/generative-ui/state-rendering).
|
|
1023
1023
|
*
|
|
1024
1024
|
* <Callout type="info">
|
|
1025
1025
|
* This example is hosted on Vercel and may take a few seconds to load.
|
|
@@ -1207,7 +1207,7 @@ function useMakeCopilotDocumentReadable(document, categories, dependencies = [])
|
|
|
1207
1207
|
function useCopilotReadable({ description, value, convert, available = "enabled" }, dependencies) {
|
|
1208
1208
|
const { copilotkit } = useCopilotKit();
|
|
1209
1209
|
const ctxIdRef = useRef(void 0);
|
|
1210
|
-
|
|
1210
|
+
useLayoutEffect(() => {
|
|
1211
1211
|
if (!copilotkit) return;
|
|
1212
1212
|
if (available === "disabled") return;
|
|
1213
1213
|
const id = copilotkit.addContext({
|