@copilotkit/react-core 1.57.0-canary.1778078321 → 1.57.0-canary.1778116520
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-XGd8L2jL.cjs → copilotkit-BLlkMAjx.cjs} +368 -502
- package/dist/copilotkit-BLlkMAjx.cjs.map +1 -0
- package/dist/{copilotkit-BNlJq5UO.d.mts → copilotkit-BYnbIBN5.d.mts} +10 -62
- package/dist/copilotkit-BYnbIBN5.d.mts.map +1 -0
- package/dist/{copilotkit-DhuXdtE1.mjs → copilotkit-N0YiBG5S.mjs} +369 -497
- package/dist/copilotkit-N0YiBG5S.mjs.map +1 -0
- package/dist/{copilotkit-DgC5oCFO.d.cts → copilotkit-vx_R9p-O.d.cts} +10 -62
- package/dist/copilotkit-vx_R9p-O.d.cts.map +1 -0
- package/dist/index.cjs +5 -2
- 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 +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +409 -347
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/context.cjs +135 -0
- package/dist/v2/context.cjs.map +1 -0
- package/dist/v2/context.d.cts +148 -0
- package/dist/v2/context.d.cts.map +1 -0
- package/dist/v2/context.d.mts +148 -0
- package/dist/v2/context.d.mts.map +1 -0
- package/dist/v2/context.mjs +129 -0
- package/dist/v2/context.mjs.map +1 -0
- package/dist/v2/headless.cjs +1085 -0
- package/dist/v2/headless.cjs.map +1 -0
- package/dist/v2/headless.d.cts +607 -0
- package/dist/v2/headless.d.cts.map +1 -0
- package/dist/v2/headless.d.mts +514 -0
- package/dist/v2/headless.d.mts.map +1 -0
- package/dist/v2/headless.mjs +1039 -0
- package/dist/v2/headless.mjs.map +1 -0
- package/dist/v2/index.cjs +1 -2
- 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 +387 -523
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +14 -6
- package/src/hooks/__tests__/use-copilot-chat-internal-connect.test.tsx +6 -5
- package/src/hooks/use-copilot-chat_internal.ts +1 -0
- package/src/v2/components/MCPAppsActivityRenderer.tsx +9 -3
- package/src/v2/components/chat/CopilotChat.tsx +1 -2
- package/src/v2/components/chat/CopilotChatMessageView.tsx +9 -24
- package/src/v2/components/chat/CopilotChatView.tsx +2 -2
- package/src/v2/components/chat/__tests__/CopilotChat.welcomeGate.test.tsx +3 -1
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.tsx +25 -29
- package/src/v2/components/chat/__tests__/MCPAppsActivityRenderer.e2e.test.tsx +102 -0
- package/src/v2/components/chat/__tests__/MCPAppsUiMessage.e2e.test.tsx +60 -5
- package/src/v2/components/index.ts +0 -1
- package/src/v2/context.ts +62 -0
- package/src/v2/headless.ts +42 -0
- package/src/v2/hooks/__tests__/standard-schema.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-agent-context.test.tsx +3 -3
- package/src/v2/hooks/__tests__/use-agent-stability.test.tsx +3 -3
- package/src/v2/hooks/__tests__/use-agent-thread-isolation.test.tsx +333 -0
- package/src/v2/hooks/__tests__/use-agent-throttle.test.tsx +85 -85
- package/src/v2/hooks/__tests__/use-interrupt.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-render-tool.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-threads.test.tsx +2 -2
- package/src/v2/hooks/__tests__/zod-regression.test.tsx +2 -2
- package/src/v2/hooks/use-agent-context.tsx +1 -1
- package/src/v2/hooks/use-agent.tsx +118 -9
- package/src/v2/hooks/use-configure-suggestions.tsx +1 -1
- package/src/v2/hooks/use-frontend-tool.tsx +2 -2
- package/src/v2/hooks/use-human-in-the-loop.tsx +1 -1
- package/src/v2/hooks/use-interrupt.tsx +1 -1
- package/src/v2/hooks/use-render-activity-message.tsx +11 -3
- package/src/v2/hooks/use-render-custom-messages.tsx +6 -1
- package/src/v2/hooks/use-render-tool-call.tsx +1 -1
- package/src/v2/hooks/use-render-tool.tsx +2 -2
- package/src/v2/hooks/use-suggestions.tsx +1 -1
- package/src/v2/hooks/use-threads.tsx +1 -1
- package/src/v2/providers/CopilotKitProvider.tsx +19 -59
- package/src/v2/styles/globals.css +0 -118
- package/tsdown.config.ts +75 -0
- package/dist/copilotkit-BNlJq5UO.d.mts.map +0 -1
- package/dist/copilotkit-DgC5oCFO.d.cts.map +0 -1
- package/dist/copilotkit-DhuXdtE1.mjs.map +0 -1
- package/dist/copilotkit-XGd8L2jL.cjs.map +0 -1
- package/src/v2/components/intelligence-indicator/IntelligenceIndicator.tsx +0 -284
- package/src/v2/components/intelligence-indicator/__tests__/IntelligenceIndicator.e2e.test.tsx +0 -464
- package/src/v2/components/intelligence-indicator/index.ts +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as
|
|
1
|
+
import { An as CatchAllFrontendAction, Cn as Tree, Dn as ActionRenderPropsNoArgsWait, En as ActionRenderPropsNoArgs, Mn as FrontendActionAvailability, N as useAgent, Nn as RenderFunctionStatus, On as ActionRenderPropsWait, Q as useRenderToolCall$1, Sn as DocumentPointer, Tn as ActionRenderProps, _n as CrewsStateItem, an as useCopilotContext, bn as CopilotChatSuggestionConfiguration, cn as LangGraphInterruptActionSetter, dn as LangGraphInterruptRenderHandlerProps, fn as LangGraphInterruptRenderProps, gn as CrewsResponseStatus, hn as CrewsResponse, in as CopilotContextParams, jn as FrontendAction, kn as CatchAllActionRenderProps, ln as LangGraphInterruptActionSetterArgs, mn as CrewsAgentState, n as defaultCopilotContextCategories, nn as CopilotApiConfig, on as CoAgentStateRender, pn as QueuedInterruptEvent, r as CopilotKitProps, rn as CopilotContext, sn as LangGraphInterruptAction, t as CopilotKit, tn as CoagentInChatRenderFunction, un as LangGraphInterruptRender, vn as CrewsTaskStateItem, wn as TreeNode, xn as SystemMessageFunction, yn as CrewsToolStateItem } from "./copilotkit-vx_R9p-O.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 { An as
|
|
1
|
+
import { An as CatchAllFrontendAction, Cn as Tree, Dn as ActionRenderPropsNoArgsWait, En as ActionRenderPropsNoArgs, Mn as FrontendActionAvailability, N as useAgent, Nn as RenderFunctionStatus, On as ActionRenderPropsWait, Q as useRenderToolCall$1, Sn as DocumentPointer, Tn as ActionRenderProps, _n as CrewsStateItem, an as useCopilotContext, bn as CopilotChatSuggestionConfiguration, cn as LangGraphInterruptActionSetter, dn as LangGraphInterruptRenderHandlerProps, fn as LangGraphInterruptRenderProps, gn as CrewsResponseStatus, hn as CrewsResponse, in as CopilotContextParams, jn as FrontendAction, kn as CatchAllActionRenderProps, ln as LangGraphInterruptActionSetterArgs, mn as CrewsAgentState, n as defaultCopilotContextCategories, nn as CopilotApiConfig, on as CoAgentStateRender, pn as QueuedInterruptEvent, r as CopilotKitProps, rn as CopilotContext, sn as LangGraphInterruptAction, t as CopilotKit, tn as CoagentInChatRenderFunction, un as LangGraphInterruptRender, vn as CrewsTaskStateItem, wn as TreeNode, xn as SystemMessageFunction, yn as CrewsToolStateItem } from "./copilotkit-BYnbIBN5.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 { B as useConfigureSuggestions, U as useHumanInTheLoop$1, V as useSuggestions, Y as useRenderCustomMessages, Z as useAgent, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useRenderToolCall$1, d as shouldShowDevConsole, et as defineToolCallRenderer, f as useToast, g as useCopilotContext, h as CopilotContext, ht as useCopilotChatConfiguration, i as ThreadsContext, l as useCoAgentStateRenders, lt as useCopilotKit, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, o as useThreads, p as CopilotMessagesContext, q as useFrontendTool$1, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, u as useAsyncCallback, z as useInterrupt } from "./copilotkit-N0YiBG5S.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";
|
|
@@ -40,7 +40,10 @@ function useCopilotChatInternal({ suggestions, onInProgress, onSubmitMessage, on
|
|
|
40
40
|
const existingConfig = useCopilotChatConfiguration();
|
|
41
41
|
const [agentAvailable, setAgentAvailable] = useState(false);
|
|
42
42
|
const resolvedAgentId = existingConfig?.agentId ?? "default";
|
|
43
|
-
const { agent } = useAgent({
|
|
43
|
+
const { agent } = useAgent({
|
|
44
|
+
agentId: resolvedAgentId,
|
|
45
|
+
threadId: existingConfig?.threadId
|
|
46
|
+
});
|
|
44
47
|
const lastConnectedAgentRef = useRef(null);
|
|
45
48
|
useEffect(() => {
|
|
46
49
|
let detached = false;
|