@copilotkit/react-core 1.68.1 → 1.68.2
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-BrfN8YeF.d.mts → copilotkit-BUIK5yln.d.mts} +15 -1
- package/dist/copilotkit-BUIK5yln.d.mts.map +1 -0
- package/dist/{copilotkit-8KSSmCH_.cjs → copilotkit-Bocmlr37.cjs} +193 -18
- package/dist/copilotkit-Bocmlr37.cjs.map +1 -0
- package/dist/{copilotkit-Ck0RL8hh.mjs → copilotkit-C4RqjAba.mjs} +193 -18
- package/dist/copilotkit-C4RqjAba.mjs.map +1 -0
- package/dist/{copilotkit-BICg0AyJ.d.cts → copilotkit-DSvKW3SS.d.cts} +15 -1
- package/dist/copilotkit-DSvKW3SS.d.cts.map +1 -0
- package/dist/index.cjs +14 -7
- 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 +14 -7
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +62 -16
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +2 -0
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +2 -0
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +2 -0
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +2 -0
- 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 +192 -17
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +7 -7
- package/skills/react-core/SKILL.md +1 -1
- package/dist/copilotkit-8KSSmCH_.cjs.map +0 -1
- package/dist/copilotkit-BICg0AyJ.d.cts.map +0 -1
- package/dist/copilotkit-BrfN8YeF.d.mts.map +0 -1
- package/dist/copilotkit-Ck0RL8hh.mjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as LangGraphInterruptActionSetterArgs, Cr as RenderFunctionStatus, Gn as CoagentInChatRenderFunction, Jn as CopilotContextParams, Kn as CopilotApiConfig, Qn as LangGraphInterruptActionSetter, Sr as FrontendActionAvailability, X as useAgent, Xn as CoAgentStateRender, Yn as useCopilotContext, Zn as LangGraphInterruptAction, _r as ActionRenderPropsNoArgsWait, ar as CrewsResponse, br as CatchAllFrontendAction, cr as CrewsTaskStateItem, dr as SystemMessageFunction, er as LangGraphInterruptRender, fr as DocumentPointer, gr as ActionRenderPropsNoArgs, hr as ActionRenderProps, ir as CrewsAgentState, lr as CrewsToolStateItem, mr as TreeNode, n as defaultCopilotContextCategories, nr as LangGraphInterruptRenderProps, or as CrewsResponseStatus, pr as Tree, qn as CopilotContext, r as CopilotKitProps, rr as QueuedInterruptEvent, sr as CrewsStateItem, t as CopilotKit, tr as LangGraphInterruptRenderHandlerProps, ur as CopilotChatSuggestionConfiguration, vr as ActionRenderPropsWait, xr as FrontendAction, yr as CatchAllActionRenderProps, yt as useRenderToolCall$1 } from "./copilotkit-
|
|
1
|
+
import { $n as LangGraphInterruptActionSetterArgs, Cr as RenderFunctionStatus, Gn as CoagentInChatRenderFunction, Jn as CopilotContextParams, Kn as CopilotApiConfig, Qn as LangGraphInterruptActionSetter, Sr as FrontendActionAvailability, X as useAgent, Xn as CoAgentStateRender, Yn as useCopilotContext, Zn as LangGraphInterruptAction, _r as ActionRenderPropsNoArgsWait, ar as CrewsResponse, br as CatchAllFrontendAction, cr as CrewsTaskStateItem, dr as SystemMessageFunction, er as LangGraphInterruptRender, fr as DocumentPointer, gr as ActionRenderPropsNoArgs, hr as ActionRenderProps, ir as CrewsAgentState, lr as CrewsToolStateItem, mr as TreeNode, n as defaultCopilotContextCategories, nr as LangGraphInterruptRenderProps, or as CrewsResponseStatus, pr as Tree, qn as CopilotContext, r as CopilotKitProps, rr as QueuedInterruptEvent, sr as CrewsStateItem, t as CopilotKit, tr as LangGraphInterruptRenderHandlerProps, ur as CopilotChatSuggestionConfiguration, vr as ActionRenderPropsWait, xr as FrontendAction, yr as CatchAllActionRenderProps, yt as useRenderToolCall$1 } from "./copilotkit-DSvKW3SS.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 LangGraphInterruptActionSetterArgs, Cr as RenderFunctionStatus, Gn as CoagentInChatRenderFunction, Jn as CopilotContextParams, Kn as CopilotApiConfig, Qn as LangGraphInterruptActionSetter, Sr as FrontendActionAvailability, X as useAgent, Xn as CoAgentStateRender, Yn as useCopilotContext, Zn as LangGraphInterruptAction, _r as ActionRenderPropsNoArgsWait, ar as CrewsResponse, br as CatchAllFrontendAction, cr as CrewsTaskStateItem, dr as SystemMessageFunction, er as LangGraphInterruptRender, fr as DocumentPointer, gr as ActionRenderPropsNoArgs, hr as ActionRenderProps, ir as CrewsAgentState, lr as CrewsToolStateItem, mr as TreeNode, n as defaultCopilotContextCategories, nr as LangGraphInterruptRenderProps, or as CrewsResponseStatus, pr as Tree, qn as CopilotContext, r as CopilotKitProps, rr as QueuedInterruptEvent, sr as CrewsStateItem, t as CopilotKit, tr as LangGraphInterruptRenderHandlerProps, ur as CopilotChatSuggestionConfiguration, vr as ActionRenderPropsWait, xr as FrontendAction, yr as CatchAllActionRenderProps, yt as useRenderToolCall$1 } from "./copilotkit-
|
|
1
|
+
import { $n as LangGraphInterruptActionSetterArgs, Cr as RenderFunctionStatus, Gn as CoagentInChatRenderFunction, Jn as CopilotContextParams, Kn as CopilotApiConfig, Qn as LangGraphInterruptActionSetter, Sr as FrontendActionAvailability, X as useAgent, Xn as CoAgentStateRender, Yn as useCopilotContext, Zn as LangGraphInterruptAction, _r as ActionRenderPropsNoArgsWait, ar as CrewsResponse, br as CatchAllFrontendAction, cr as CrewsTaskStateItem, dr as SystemMessageFunction, er as LangGraphInterruptRender, fr as DocumentPointer, gr as ActionRenderPropsNoArgs, hr as ActionRenderProps, ir as CrewsAgentState, lr as CrewsToolStateItem, mr as TreeNode, n as defaultCopilotContextCategories, nr as LangGraphInterruptRenderProps, or as CrewsResponseStatus, pr as Tree, qn as CopilotContext, r as CopilotKitProps, rr as QueuedInterruptEvent, sr as CrewsStateItem, t as CopilotKit, tr as LangGraphInterruptRenderHandlerProps, ur as CopilotChatSuggestionConfiguration, vr as ActionRenderPropsWait, xr as FrontendAction, yr as CatchAllActionRenderProps, yt as useRenderToolCall$1 } from "./copilotkit-BUIK5yln.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 { Dt as useRenderToolCall$1, Mt as useCopilotChatConfiguration, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useRenderCustomMessages, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, h as CopilotContext, i as ThreadsContext, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useHumanInTheLoop$1, o as useThreads, ot as useFrontendTool$1, p as CopilotMessagesContext, pt as defineToolCallRenderer, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useAgent, u as useAsyncCallback, ut as useCopilotKit } from "./copilotkit-
|
|
3
|
+
import { Dt as useRenderToolCall$1, Mt as useCopilotChatConfiguration, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useRenderCustomMessages, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, h as CopilotContext, i as ThreadsContext, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useHumanInTheLoop$1, o as useThreads, ot as useFrontendTool$1, p as CopilotMessagesContext, pt as defineToolCallRenderer, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useAgent, u as useAsyncCallback, ut as useCopilotKit } from "./copilotkit-C4RqjAba.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";
|
|
@@ -1136,30 +1136,37 @@ function useCopilotReadable({ description, value, convert, available = "enabled"
|
|
|
1136
1136
|
|
|
1137
1137
|
//#endregion
|
|
1138
1138
|
//#region src/hooks/use-agent-nodename.ts
|
|
1139
|
+
/**
|
|
1140
|
+
* Tracks the node the agent is currently executing.
|
|
1141
|
+
*
|
|
1142
|
+
* Backed by state rather than a ref: mutating a ref schedules no render, so
|
|
1143
|
+
* consumers such as `useCoAgent().nodeName` kept reporting whichever node was
|
|
1144
|
+
* current at their last render and never updated on their own.
|
|
1145
|
+
*/
|
|
1139
1146
|
function useAgentNodeName(agentName) {
|
|
1140
1147
|
const { agent } = useAgent({ agentId: agentName });
|
|
1141
|
-
const
|
|
1148
|
+
const [nodeName, setNodeName] = useState("start");
|
|
1142
1149
|
useEffect(() => {
|
|
1143
1150
|
if (!agent) return;
|
|
1144
1151
|
const subscription = agent.subscribe({
|
|
1145
1152
|
onStepStartedEvent: ({ event }) => {
|
|
1146
|
-
|
|
1153
|
+
setNodeName(event.stepName);
|
|
1147
1154
|
},
|
|
1148
1155
|
onRunStartedEvent: () => {
|
|
1149
|
-
|
|
1156
|
+
setNodeName("start");
|
|
1150
1157
|
},
|
|
1151
1158
|
onRunFinishedEvent: () => {
|
|
1152
|
-
|
|
1159
|
+
setNodeName("end");
|
|
1153
1160
|
},
|
|
1154
1161
|
onRunErrorEvent: () => {
|
|
1155
|
-
|
|
1162
|
+
setNodeName("end");
|
|
1156
1163
|
}
|
|
1157
1164
|
});
|
|
1158
1165
|
return () => {
|
|
1159
1166
|
subscription.unsubscribe();
|
|
1160
1167
|
};
|
|
1161
1168
|
}, [agent]);
|
|
1162
|
-
return
|
|
1169
|
+
return nodeName;
|
|
1163
1170
|
}
|
|
1164
1171
|
|
|
1165
1172
|
//#endregion
|