@copilotkit/react-core 1.68.2 → 1.68.3-canary.1787220377
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-DSvKW3SS.d.cts → copilotkit-B1K0Tgnz.d.cts} +33 -3
- package/dist/copilotkit-B1K0Tgnz.d.cts.map +1 -0
- package/dist/{copilotkit-BUIK5yln.d.mts → copilotkit-CZjzQPdq.d.mts} +33 -3
- package/dist/copilotkit-CZjzQPdq.d.mts.map +1 -0
- package/dist/{copilotkit-C4RqjAba.mjs → copilotkit-DT2FmOwK.mjs} +71 -2
- package/dist/{copilotkit-C4RqjAba.mjs.map → copilotkit-DT2FmOwK.mjs.map} +1 -1
- package/dist/{copilotkit-Bocmlr37.cjs → copilotkit-EFunREg5.cjs} +76 -1
- package/dist/copilotkit-EFunREg5.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/v2/index.cjs +2 -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 +70 -0
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/copilotkit-BUIK5yln.d.mts.map +0 -1
- package/dist/copilotkit-Bocmlr37.cjs.map +0 -1
- package/dist/copilotkit-DSvKW3SS.d.cts.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-EFunREg5.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 { $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";
|
package/dist/v2/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-EFunREg5.cjs');
|
|
5
5
|
require("./index.css");
|
|
6
6
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
7
7
|
let _copilotkit_react_core_v2_context = require("@copilotkit/react-core/v2/context");
|
|
@@ -110,6 +110,7 @@ exports.useRenderCustomMessages = require_copilotkit.useRenderCustomMessages;
|
|
|
110
110
|
exports.useRenderTool = require_copilotkit.useRenderTool;
|
|
111
111
|
exports.useRenderToolCall = require_copilotkit.useRenderToolCall;
|
|
112
112
|
exports.useSandboxFunctions = require_copilotkit.useSandboxFunctions;
|
|
113
|
+
exports.useSubagent = require_copilotkit.useSubagent;
|
|
113
114
|
exports.useSuggestions = require_copilotkit.useSuggestions;
|
|
114
115
|
exports.useThreads = require_copilotkit.useThreads$1;
|
|
115
116
|
exports.ɵrunMcpFollowUp = require_copilotkit.ɵrunMcpFollowUp;
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as useAgent, $t as CopilotSidebar, A as UseAttachmentsReturn, An as CopilotChatReasoningMessageProps, At as MCPAppsActivityContent, B as useMemories, Bn as CopilotChatConfigurationProvider, Bt as AttachmentModality, C as MemoryScope, Cn as IntelligenceIndicatorView, Ct as GenerateSandboxedUiArgs, D as UseLearningContainersArgs, Dn as CopilotChatSuggestionPill, Dt as OpenGenerativeUIContent, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionViewProps, Et as OpenGenerativeUIActivityType, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsView, Ft as ɵrunMcpFollowUp, G as AgentContextInput, Gn as AudioRecorderError, Gt as CopilotThreadsDrawerProps, H as useInterrupt, Hn as CopilotChatConfigurationValue, Ht as CopilotChatAttachmentRenderer, I as LearnFromUserActionResult, In as CopilotChatToolCallsViewProps, It as CopilotKitInspector, J as useCapabilities, Jt as UseThreadsInput, K as JsonSerializable, Kn as AudioRecorderState, Kt as CopilotThreadsDrawerRowRenderer, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInput, Lt as CopilotKitInspectorProps, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatUserMessageProps, Mt as MCPAppsActivityRenderer, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatAssistantMessage, Nt as MCPAppsActivityType, O as useLearningContainers, On as CopilotChatSuggestionPillProps, Ot as OpenGenerativeUIContentSchema, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatAssistantMessageProps, Pt as ɵMcpFollowUpHost, Q as UseAgentUpdate, Qt as CopilotPopupProps, R as useLearnFromUserAction, Rn as CopilotChatInputProps, Rt as WildcardToolCallRender, S as MemoryKind, Sn as IntelligenceIndicatorStatus, St as useRenderToolCall, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionView, Tt as OpenGenerativeUIActivityRenderer, U as useConfigureSuggestions, Un as CopilotChatLabels, Ut as CopilotChatAttachmentQueue, V as UseInterruptConfig, Vn as CopilotChatConfigurationProviderProps, Vt as AttachmentsConfig, W as useSuggestions, Wn as useCopilotChatConfiguration, Wt as CopilotThreadsDrawer, X as UseSubagentParams, Xt as useThreads, Y as SubagentView, Yt as UseThreadsResult, Z as useSubagent, Zt as CopilotPopup, _ as CopilotKitCoreReact, _n as CopilotChatMessageViewProps, _t as ReactActivityMessageRenderer, a as A2UIMessageRendererOptions, an as CopilotModalHeader, at as useRenderActivityMessage, b as Memory, bn as IntelligenceIndicatorProps, bt as ReactCustomMessageRenderer, c as InspectorAnchor, cn as CopilotChatToggleButtonProps, ct as InterruptCancelFn, d as CopilotKitProvider, dn as CopilotChat, dt as InterruptRenderProps, en as CopilotSidebarProps, et as useHumanInTheLoop, f as CopilotKitProviderProps, fn as CopilotChatProps, ft as InterruptResolveFn, g as useLicenseContext, gn as CopilotChatMessageView, gt as ReactFrontendTool, h as useCopilotKit, hn as AutoScrollMode, ht as ReactHumanInTheLoop, i as A2UIActionInterceptor, in as CopilotSidebarViewProps, it as useFrontendTool, j as useAttachments, jn as CopilotChatUserMessage, jt as MCPAppsActivityContentSchema, k as UseAttachmentsProps, kn as CopilotChatReasoningMessage, kt as OpenGenerativeUIToolRenderer, l as SandboxFunctionsContext, ln as DefaultCloseIcon, lt as InterruptEvent, m as CopilotKitContextValue, mn as CopilotChatViewProps, mt as defineToolCallRenderer, nn as CopilotPopupViewProps, nt as useRenderTool, o as A2UIUserAction, on as CopilotModalHeaderProps, ot as SandboxFunction, p as A2UIRecoveryRendererOptions, pn as CopilotChatView, pt as ResumeEntry, q as useAgentContext, qn as CopilotChatAudioRecorder, qt as Thread, r as CopilotKitProps, rn as CopilotSidebarView, rt as useComponent, s as createA2UIMessageRenderer, sn as CopilotChatToggleButton, st as Interrupt, t as CopilotKit, tn as CopilotPopupView, tt as useDefaultRenderTool, u as useSandboxFunctions, un as DefaultOpenIcon, ut as InterruptHandlerProps, v as CopilotKitCoreReactConfig, vn as INTELLIGENCE_TURN_HEAD, vt as ReactToolCallRenderer, w as NewMemory, wn as IntelligenceIndicatorViewProps, wt as GenerateSandboxedUiArgsSchema, x as MemoryChanges, xn as getIntelligenceTurnAnchors, xt as ReactCustomMessageRendererPosition, y as CopilotKitCoreReactSubscriber, yn as IntelligenceIndicator, yt as useRenderCustomMessages, z as UseMemoriesResult, zn as ToolsMenuItem, zt as Attachment } from "../copilotkit-B1K0Tgnz.cjs";
|
|
2
2
|
import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
3
3
|
export * from "@copilotkit/core";
|
|
4
4
|
export * from "@ag-ui/client";
|
|
5
|
-
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
|
5
|
+
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, SubagentView, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseSubagentParams, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSubagent, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
package/dist/v2/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as useAgent, $t as CopilotSidebar, A as UseAttachmentsReturn, An as CopilotChatReasoningMessageProps, At as MCPAppsActivityContent, B as useMemories, Bn as CopilotChatConfigurationProvider, Bt as AttachmentModality, C as MemoryScope, Cn as IntelligenceIndicatorView, Ct as GenerateSandboxedUiArgs, D as UseLearningContainersArgs, Dn as CopilotChatSuggestionPill, Dt as OpenGenerativeUIContent, E as useLearningContainersInCurrentThread, En as CopilotChatSuggestionViewProps, Et as OpenGenerativeUIActivityType, F as LearnFromUserActionInput, Fn as CopilotChatToolCallsView, Ft as ɵrunMcpFollowUp, G as AgentContextInput, Gn as AudioRecorderError, Gt as CopilotThreadsDrawerProps, H as useInterrupt, Hn as CopilotChatConfigurationValue, Ht as CopilotChatAttachmentRenderer, I as LearnFromUserActionResult, In as CopilotChatToolCallsViewProps, It as CopilotKitInspector, J as useCapabilities, Jt as UseThreadsInput, K as JsonSerializable, Kn as AudioRecorderState, Kt as CopilotThreadsDrawerRowRenderer, L as UseLearnFromUserActionRecorder, Ln as CopilotChatInput, Lt as CopilotKitInspectorProps, M as LearnFromUserActionInCurrentThreadInput, Mn as CopilotChatUserMessageProps, Mt as MCPAppsActivityRenderer, N as UseLearnFromUserActionInCurrentThreadRecorder, Nn as CopilotChatAssistantMessage, Nt as MCPAppsActivityType, O as useLearningContainers, On as CopilotChatSuggestionPillProps, Ot as OpenGenerativeUIContentSchema, P as useLearnFromUserActionInCurrentThread, Pn as CopilotChatAssistantMessageProps, Pt as ɵMcpFollowUpHost, Q as UseAgentUpdate, Qt as CopilotPopupProps, R as useLearnFromUserAction, Rn as CopilotChatInputProps, Rt as WildcardToolCallRender, S as MemoryKind, Sn as IntelligenceIndicatorStatus, St as useRenderToolCall, T as UseLearningContainersInCurrentThreadArgs, Tn as CopilotChatSuggestionView, Tt as OpenGenerativeUIActivityRenderer, U as useConfigureSuggestions, Un as CopilotChatLabels, Ut as CopilotChatAttachmentQueue, V as UseInterruptConfig, Vn as CopilotChatConfigurationProviderProps, Vt as AttachmentsConfig, W as useSuggestions, Wn as useCopilotChatConfiguration, Wt as CopilotThreadsDrawer, X as UseSubagentParams, Xt as useThreads, Y as SubagentView, Yt as UseThreadsResult, Z as useSubagent, Zt as CopilotPopup, _ as useCopilotKit, _n as CopilotChatMessageViewProps, _t as ReactActivityMessageRenderer, a as A2UIMessageRendererOptions, an as CopilotModalHeader, at as useRenderActivityMessage, b as Memory, bn as IntelligenceIndicatorProps, bt as ReactCustomMessageRenderer, c as CopilotKitCoreReact, cn as CopilotChatToggleButtonProps, ct as InterruptCancelFn, d as InspectorAnchor, dn as CopilotChat, dt as InterruptRenderProps, en as CopilotSidebarProps, et as useHumanInTheLoop, f as SandboxFunctionsContext, fn as CopilotChatProps, ft as InterruptResolveFn, g as CopilotKitProviderProps, gn as CopilotChatMessageView, gt as ReactFrontendTool, h as CopilotKitProvider, hn as AutoScrollMode, ht as ReactHumanInTheLoop, i as A2UIActionInterceptor, in as CopilotSidebarViewProps, it as useFrontendTool, j as useAttachments, jn as CopilotChatUserMessage, jt as MCPAppsActivityContentSchema, k as UseAttachmentsProps, kn as CopilotChatReasoningMessage, kt as OpenGenerativeUIToolRenderer, l as CopilotKitCoreReactConfig, ln as DefaultCloseIcon, lt as InterruptEvent, m as CopilotKitContextValue, mn as CopilotChatViewProps, mt as defineToolCallRenderer, nn as CopilotPopupViewProps, nt as useRenderTool, o as A2UIUserAction, on as CopilotModalHeaderProps, ot as SandboxFunction, p as useSandboxFunctions, pn as CopilotChatView, pt as ResumeEntry, q as useAgentContext, qn as CopilotChatAudioRecorder, qt as Thread, r as CopilotKitProps, rn as CopilotSidebarView, rt as useComponent, s as createA2UIMessageRenderer, sn as CopilotChatToggleButton, st as Interrupt, t as CopilotKit, tn as CopilotPopupView, tt as useDefaultRenderTool, u as CopilotKitCoreReactSubscriber, un as DefaultOpenIcon, ut as InterruptHandlerProps, v as useLicenseContext, vn as INTELLIGENCE_TURN_HEAD, vt as ReactToolCallRenderer, w as NewMemory, wn as IntelligenceIndicatorViewProps, wt as GenerateSandboxedUiArgsSchema, x as MemoryChanges, xn as getIntelligenceTurnAnchors, xt as ReactCustomMessageRendererPosition, y as A2UIRecoveryRendererOptions, yn as IntelligenceIndicator, yt as useRenderCustomMessages, z as UseMemoriesResult, zn as ToolsMenuItem, zt as Attachment } from "../copilotkit-CZjzQPdq.mjs";
|
|
2
2
|
import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
3
3
|
export * from "@copilotkit/core";
|
|
4
4
|
export * from "@ag-ui/client";
|
|
5
|
-
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
|
5
|
+
export { type A2UIActionInterceptor, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, AgentContextInput, Attachment, AttachmentModality, AttachmentsConfig, AudioRecorderError, AudioRecorderState, AutoScrollMode, CopilotChat, CopilotChatAssistantMessage, CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatConfigurationProviderProps, CopilotChatConfigurationValue, CopilotChatInput, CopilotChatInputProps, CopilotChatLabels, CopilotChatMessageView, CopilotChatMessageViewProps, CopilotChatProps, CopilotChatReasoningMessage, CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, CopilotChatSuggestionPillProps, CopilotChatSuggestionView, CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToggleButtonProps, CopilotChatToolCallsView, CopilotChatToolCallsViewProps, CopilotChatUserMessage, CopilotChatUserMessageProps, CopilotChatView, CopilotChatViewProps, CopilotKit, CopilotKitContextValue, CopilotKitCoreReact, CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitProps, CopilotKitProvider, CopilotKitProviderProps, CopilotModalHeader, CopilotModalHeaderProps, CopilotPopup, CopilotPopupProps, CopilotPopupView, CopilotPopupViewProps, CopilotSidebar, CopilotSidebarProps, CopilotSidebarView, CopilotSidebarViewProps, CopilotThreadsDrawer, CopilotThreadsDrawerProps, CopilotThreadsDrawerRowRenderer, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, InspectorAnchor, IntelligenceIndicator, IntelligenceIndicatorProps, IntelligenceIndicatorStatus, IntelligenceIndicatorView, IntelligenceIndicatorViewProps, Interrupt, InterruptCancelFn, InterruptEvent, InterruptHandlerProps, InterruptRenderProps, InterruptResolveFn, JsonSerializable, LearnFromUserActionInCurrentThreadInput, LearnFromUserActionInput, LearnFromUserActionResult, MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, Memory, MemoryChanges, MemoryKind, MemoryScope, NewMemory, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, ResumeEntry, SandboxFunction, SandboxFunctionsContext, SubagentView, Thread, ToolsMenuItem, UseAgentUpdate, UseAttachmentsProps, UseAttachmentsReturn, UseInterruptConfig, UseLearnFromUserActionInCurrentThreadRecorder, UseLearnFromUserActionRecorder, UseLearningContainersArgs, UseLearningContainersInCurrentThreadArgs, UseMemoriesResult, UseSubagentParams, UseThreadsInput, UseThreadsResult, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSubagent, useSuggestions, useThreads, ɵMcpFollowUpHost, ɵrunMcpFollowUp };
|
package/dist/v2/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { $ as useCapabilities, A as CopilotChatMessageView, At as
|
|
3
|
+
import { $ as useCapabilities, A as CopilotChatMessageView, At as AudioRecorderError, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as MCPAppsActivityContentSchema, D as CopilotChat, Dt as CopilotKitInspector, E as DefaultOpenIcon, Et as ɵrunMcpFollowUp, F as CopilotChatSuggestionView, G as useLearnFromUserActionInCurrentThread, H as useLearningContainersInCurrentThread, I as CopilotChatSuggestionPill, J as useThreads, K as useLearnFromUserAction, L as CopilotChatReasoningMessage_default, M as IntelligenceIndicator, Mt as CopilotChatConfigurationProvider, N as getIntelligenceTurnAnchors, Nt as useCopilotChatConfiguration, O as CopilotChatView_default, Ot as useRenderToolCall, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as useSandboxFunctions, T as DefaultCloseIcon, Tt as MCPAppsActivityType, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as OpenGenerativeUIActivityRenderer, at as useRenderTool, b as CopilotSidebar, bt as OpenGenerativeUIToolRenderer, ct as useRenderActivityMessage, dt as useCopilotKit, et as useSubagent, ft as useLicenseContext, gt as GenerateSandboxedUiArgsSchema, ht as createA2UIMessageRenderer, it as useDefaultRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as CopilotChatAudioRecorder, k as CopilotChatAttachmentQueue, kt as CopilotChatInput_default, lt as useRenderCustomMessages, mt as defineToolCallRenderer, nt as useAgent, ot as useComponent, pt as CopilotKitCoreReact, q as useMemories, rt as useHumanInTheLoop, st as useFrontendTool, t as CopilotKit, tt as UseAgentUpdate, ut as CopilotKitProvider, v as CopilotThreadsDrawer, vt as OpenGenerativeUIActivityType, w as CopilotChatToggleButton, wt as MCPAppsActivityRenderer, x as CopilotPopupView, xt as SandboxFunctionsContext, y as CopilotPopup, yt as OpenGenerativeUIContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-DT2FmOwK.mjs";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ export * from "@copilotkit/core"
|
|
|
8
8
|
|
|
9
9
|
export * from "@ag-ui/client"
|
|
10
10
|
|
|
11
|
-
export { AudioRecorderError, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotKit, CopilotKitCoreReact, CopilotKitInspector, CopilotKitProvider, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, IntelligenceIndicator, IntelligenceIndicatorView, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, SandboxFunctionsContext, UseAgentUpdate, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, ɵrunMcpFollowUp };
|
|
11
|
+
export { AudioRecorderError, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotKit, CopilotKitCoreReact, CopilotKitInspector, CopilotKitProvider, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, GenerateSandboxedUiArgsSchema, INTELLIGENCE_TURN_HEAD, IntelligenceIndicator, IntelligenceIndicatorView, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, SandboxFunctionsContext, UseAgentUpdate, WildcardToolCallRender, a2uiDefaultTheme, createA2UIMessageRenderer, defineToolCallRenderer, getIntelligenceTurnAnchors, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSubagent, useSuggestions, useThreads, ɵrunMcpFollowUp };
|
package/dist/v2/index.umd.js
CHANGED
|
@@ -4657,6 +4657,75 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4657
4657
|
};
|
|
4658
4658
|
}
|
|
4659
4659
|
|
|
4660
|
+
//#endregion
|
|
4661
|
+
//#region src/v2/hooks/use-subagent.tsx
|
|
4662
|
+
const warnedAmbiguousNames = /* @__PURE__ */ new Set();
|
|
4663
|
+
function resolveSubagent(subagents, subagentRunId, subagentName) {
|
|
4664
|
+
if (subagentRunId) {
|
|
4665
|
+
const match = subagents[subagentRunId];
|
|
4666
|
+
return match ? { ...match } : void 0;
|
|
4667
|
+
}
|
|
4668
|
+
if (subagentName) {
|
|
4669
|
+
const matches = Object.values(subagents).filter((s) => s.name === subagentName);
|
|
4670
|
+
if (matches.length === 0) return;
|
|
4671
|
+
const chosen = matches[matches.length - 1];
|
|
4672
|
+
return matches.length > 1 ? {
|
|
4673
|
+
...chosen,
|
|
4674
|
+
isAmbiguous: true,
|
|
4675
|
+
matchCount: matches.length
|
|
4676
|
+
} : { ...chosen };
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
/**
|
|
4680
|
+
* Read a subagent's live lifecycle state (name, description, running status)
|
|
4681
|
+
* from the CopilotKit core subagent registry, by id or by declared name.
|
|
4682
|
+
*
|
|
4683
|
+
* @example
|
|
4684
|
+
* const sub = useSubagent({ subagentRunId: message.subagentRunId });
|
|
4685
|
+
* // sub?.name, sub?.description, sub?.status
|
|
4686
|
+
*/
|
|
4687
|
+
function useSubagent(params) {
|
|
4688
|
+
const { subagentRunId, subagentName, agentId } = params;
|
|
4689
|
+
const { copilotkit } = useCopilotKit();
|
|
4690
|
+
const config = useCopilotChatConfiguration();
|
|
4691
|
+
const resolvedAgentId = (0, react.useMemo)(() => agentId ?? config?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID, [agentId, config?.agentId]);
|
|
4692
|
+
const [subagent, setSubagent] = (0, react.useState)(() => resolveSubagent(copilotkit.getSubagents(resolvedAgentId), subagentRunId, subagentName));
|
|
4693
|
+
(0, react.useEffect)(() => {
|
|
4694
|
+
setSubagent(resolveSubagent(copilotkit.getSubagents(resolvedAgentId), subagentRunId, subagentName));
|
|
4695
|
+
}, [
|
|
4696
|
+
copilotkit,
|
|
4697
|
+
resolvedAgentId,
|
|
4698
|
+
subagentRunId,
|
|
4699
|
+
subagentName
|
|
4700
|
+
]);
|
|
4701
|
+
(0, react.useEffect)(() => {
|
|
4702
|
+
const subscription = copilotkit.subscribe({ onSubagentsChanged: ({ agentId: changedAgentId, subagents }) => {
|
|
4703
|
+
if (changedAgentId !== resolvedAgentId) return;
|
|
4704
|
+
setSubagent(resolveSubagent(subagents, subagentRunId, subagentName));
|
|
4705
|
+
} });
|
|
4706
|
+
return () => {
|
|
4707
|
+
subscription.unsubscribe();
|
|
4708
|
+
};
|
|
4709
|
+
}, [
|
|
4710
|
+
copilotkit,
|
|
4711
|
+
resolvedAgentId,
|
|
4712
|
+
subagentRunId,
|
|
4713
|
+
subagentName
|
|
4714
|
+
]);
|
|
4715
|
+
(0, react.useEffect)(() => {
|
|
4716
|
+
if (process.env.NODE_ENV === "production" || !subagentName || !subagent?.isAmbiguous) return;
|
|
4717
|
+
const key = `${subagentName}:${subagent.matchCount}`;
|
|
4718
|
+
if (warnedAmbiguousNames.has(key)) return;
|
|
4719
|
+
warnedAmbiguousNames.add(key);
|
|
4720
|
+
console.warn(`[CopilotKit] useSubagent({ subagentName: ${JSON.stringify(subagentName)} }) matched ${subagent.matchCount} subagents. Returning the most recently started one; pass a subagentRunId for a stable reference.`);
|
|
4721
|
+
}, [
|
|
4722
|
+
subagentName,
|
|
4723
|
+
subagent?.isAmbiguous,
|
|
4724
|
+
subagent?.matchCount
|
|
4725
|
+
]);
|
|
4726
|
+
return subagent;
|
|
4727
|
+
}
|
|
4728
|
+
|
|
4660
4729
|
//#endregion
|
|
4661
4730
|
//#region src/v2/hooks/use-capabilities.tsx
|
|
4662
4731
|
/**
|
|
@@ -11954,6 +12023,7 @@ exports.useRenderCustomMessages = useRenderCustomMessages;
|
|
|
11954
12023
|
exports.useRenderTool = useRenderTool;
|
|
11955
12024
|
exports.useRenderToolCall = useRenderToolCall;
|
|
11956
12025
|
exports.useSandboxFunctions = useSandboxFunctions;
|
|
12026
|
+
exports.useSubagent = useSubagent;
|
|
11957
12027
|
exports.useSuggestions = useSuggestions;
|
|
11958
12028
|
exports.useThreads = useThreads;
|
|
11959
12029
|
exports.ɵrunMcpFollowUp = ɵrunMcpFollowUp;
|