@copilotkit/react-core 1.68.1 → 1.68.3-canary.1786716392
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-BICg0AyJ.d.cts → copilotkit-B1K0Tgnz.d.cts} +47 -3
- package/dist/copilotkit-B1K0Tgnz.d.cts.map +1 -0
- package/dist/{copilotkit-BrfN8YeF.d.mts → copilotkit-CZjzQPdq.d.mts} +47 -3
- package/dist/copilotkit-CZjzQPdq.d.mts.map +1 -0
- package/dist/{copilotkit-Ck0RL8hh.mjs → copilotkit-DT2FmOwK.mjs} +263 -19
- package/dist/copilotkit-DT2FmOwK.mjs.map +1 -0
- package/dist/{copilotkit-8KSSmCH_.cjs → copilotkit-EFunREg5.cjs} +268 -18
- package/dist/copilotkit-EFunREg5.cjs.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 +2 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +2 -2
- package/dist/v2/index.d.mts +2 -2
- package/dist/v2/index.mjs +2 -2
- package/dist/v2/index.umd.js +262 -17
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- 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
|
|
1
|
+
import { $ as useAgent, $n as CoAgentStateRender, Cr as CatchAllFrontendAction, Er as RenderFunctionStatus, Jn as CoagentInChatRenderFunction, Qn as useCopilotContext, Sr as CatchAllActionRenderProps, St as useRenderToolCall$1, Tr as FrontendActionAvailability, Xn as CopilotContext, Yn as CopilotApiConfig, Zn as CopilotContextParams, _r as TreeNode, ar as LangGraphInterruptRenderProps, br as ActionRenderPropsNoArgsWait, cr as CrewsResponse, dr as CrewsTaskStateItem, er as LangGraphInterruptAction, fr as CrewsToolStateItem, gr as Tree, hr as DocumentPointer, ir as LangGraphInterruptRenderHandlerProps, lr as CrewsResponseStatus, mr as SystemMessageFunction, n as defaultCopilotContextCategories, nr as LangGraphInterruptActionSetterArgs, or as QueuedInterruptEvent, pr as CopilotChatSuggestionConfiguration, r as CopilotKitProps, rr as LangGraphInterruptRender, sr as CrewsAgentState, t as CopilotKit, tr as LangGraphInterruptActionSetter, ur as CrewsStateItem, vr as ActionRenderProps, wr as FrontendAction, xr as ActionRenderPropsWait, yr as ActionRenderPropsNoArgs } from "./copilotkit-B1K0Tgnz.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
|
|
1
|
+
import { $ as useAgent, $n as CoAgentStateRender, Cr as CatchAllFrontendAction, Er as RenderFunctionStatus, Jn as CoagentInChatRenderFunction, Qn as useCopilotContext, Sr as CatchAllActionRenderProps, St as useRenderToolCall$1, Tr as FrontendActionAvailability, Xn as CopilotContext, Yn as CopilotApiConfig, Zn as CopilotContextParams, _r as TreeNode, ar as LangGraphInterruptRenderProps, br as ActionRenderPropsNoArgsWait, cr as CrewsResponse, dr as CrewsTaskStateItem, er as LangGraphInterruptAction, fr as CrewsToolStateItem, gr as Tree, hr as DocumentPointer, ir as LangGraphInterruptRenderHandlerProps, lr as CrewsResponseStatus, mr as SystemMessageFunction, n as defaultCopilotContextCategories, nr as LangGraphInterruptActionSetterArgs, or as QueuedInterruptEvent, pr as CopilotChatSuggestionConfiguration, r as CopilotKitProps, rr as LangGraphInterruptRender, sr as CrewsAgentState, t as CopilotKit, tr as LangGraphInterruptActionSetter, ur as CrewsStateItem, vr as ActionRenderProps, wr as FrontendAction, xr as ActionRenderPropsWait, yr as ActionRenderPropsNoArgs } from "./copilotkit-CZjzQPdq.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 { Nt as useCopilotChatConfiguration, Ot as useRenderToolCall$1, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, 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-DT2FmOwK.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
|