@copilotkit/react-core 1.75.0 → 1.75.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.
@@ -1605,7 +1605,7 @@ function useRenderToolCall() {
1605
1605
 
1606
1606
  //#endregion
1607
1607
  //#region package.json
1608
- var version = "1.75.0";
1608
+ var version = "1.75.2";
1609
1609
 
1610
1610
  //#endregion
1611
1611
  //#region src/v2/components/CopilotKitInspector.tsx
@@ -4635,6 +4635,7 @@ function useAgent({ agentId, threadId, runtimeAgentId, updates, throttleMs } = {
4635
4635
  if (updateFlags.includes(UseAgentUpdate.OnStateChanged)) handlers.onStateChanged = batchedForceUpdate;
4636
4636
  if (updateFlags.includes(UseAgentUpdate.OnRunStatusChanged)) {
4637
4637
  handlers.onRunInitialized = batchedForceUpdate;
4638
+ handlers.onRunStartedEvent = batchedForceUpdate;
4638
4639
  handlers.onRunFinalized = batchedForceUpdate;
4639
4640
  handlers.onRunFailed = batchedForceUpdate;
4640
4641
  handlers.onRunErrorEvent = batchedForceUpdate;
@@ -4990,7 +4991,6 @@ function useInterrupt(config) {
4990
4991
  pendingRef.current = pending;
4991
4992
  const [handlerResult, setHandlerResult] = useState(null);
4992
4993
  const interruptStateRef = useRef(new ɵInterruptState());
4993
- const interruptRunIdsRef = useRef(/* @__PURE__ */ new Map());
4994
4994
  const legacyRunIdRef = useRef(void 0);
4995
4995
  useEffect(() => {
4996
4996
  const interruptState = interruptStateRef.current;
@@ -5004,16 +5004,11 @@ function useInterrupt(config) {
5004
5004
  };
5005
5005
  },
5006
5006
  onRunFinishedEvent: (params) => {
5007
- if (params.outcome === "interrupt") {
5008
- const runId = params.input.runId;
5009
- for (const interrupt of params.interrupts) interruptRunIdsRef.current.set(interrupt.id, runId);
5010
- localStandard = params.interrupts;
5011
- }
5007
+ if (params.outcome === "interrupt") localStandard = params.interrupts;
5012
5008
  },
5013
5009
  onRunStartedEvent: () => {
5014
5010
  localLegacy = null;
5015
5011
  localStandard = null;
5016
- interruptRunIdsRef.current.clear();
5017
5012
  legacyRunIdRef.current = void 0;
5018
5013
  interruptState.clear();
5019
5014
  setPending(null);
@@ -5033,7 +5028,6 @@ function useInterrupt(config) {
5033
5028
  onRunFailed: () => {
5034
5029
  localLegacy = null;
5035
5030
  localStandard = null;
5036
- interruptRunIdsRef.current.clear();
5037
5031
  legacyRunIdRef.current = void 0;
5038
5032
  interruptState.clear();
5039
5033
  setPending(null);
@@ -5073,7 +5067,6 @@ function useInterrupt(config) {
5073
5067
  return;
5074
5068
  }
5075
5069
  if (decision.kind !== "resume") return;
5076
- const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
5077
5070
  for (const toolResult of decision.toolResults) agent.addMessage({
5078
5071
  id: randomUUID(),
5079
5072
  role: "tool",
@@ -5083,8 +5076,7 @@ function useInterrupt(config) {
5083
5076
  try {
5084
5077
  return await copilotkit.runAgent({
5085
5078
  agent,
5086
- resume: decision.resume,
5087
- ...runId !== void 0 ? { runId } : {}
5079
+ resume: decision.resume
5088
5080
  });
5089
5081
  } catch (err) {
5090
5082
  console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
@@ -5111,7 +5103,6 @@ function useInterrupt(config) {
5111
5103
  return;
5112
5104
  }
5113
5105
  if (decision.kind !== "resume") return;
5114
- const runId = decision.resume.map((entry) => interruptRunIdsRef.current.get(entry.interruptId)).find((candidate) => candidate !== void 0);
5115
5106
  for (const toolResult of decision.toolResults) agent.addMessage({
5116
5107
  id: randomUUID(),
5117
5108
  role: "tool",
@@ -5121,8 +5112,7 @@ function useInterrupt(config) {
5121
5112
  try {
5122
5113
  return await copilotkit.runAgent({
5123
5114
  agent,
5124
- resume: decision.resume,
5125
- ...runId !== void 0 ? { runId } : {}
5115
+ resume: decision.resume
5126
5116
  });
5127
5117
  } catch (err) {
5128
5118
  console.error("[CopilotKit] useInterrupt resolve: runAgent rejected; clearing pending + rethrowing", err);
@@ -12582,4 +12572,4 @@ function validateProps(props) {
12582
12572
 
12583
12573
  //#endregion
12584
12574
  export { useAgentContext as $, ɵisRetryableMemoryStatus as $i, ResumeEntrySchema as $n, compactEvents as $r, BaseMessageSchema as $t, CopilotChatMessageView as A, parseSSEStream as Ai, MemoryError as An, ThinkingEndEventSchema as Ar, CopilotChatInput_default as At, CopilotChatAssistantMessage_default as B, tokenUsageFromLangChainMetadata as Bi, OutputCapabilitiesSchema as Bn, ToolCallSchema as Br, ActivityMessageSchema as Bt, CopilotModalHeader as C, ɵselectThreadsError$1 as Ca, ofType as Ci, InputContentDataSourceSchema as Cn, SuggestionEngine as Cr, useSandboxFunctions as Ct, CopilotChat as D, onInspectorViewThread$1 as Di, IntelligenceAgent as Dn, TextMessageContentEventSchema as Dr, ɵrunMcpFollowUp as Dt, DefaultOpenIcon as E, onInspectorStopViewing$1 as Ei, InputContentUrlSourceSchema as En, TextMessageChunkEventSchema as Er, MCPAppsActivityType as Et, CopilotChatSuggestionView as F, resolveDebugLogger as Fi, MultiAgentCapabilitiesSchema as Fn, TokenUsageSchema as Fr, AGUIConnectNotImplementedError$1 as Ft, useLearnFromUserActionInCurrentThread as G, ɵInterruptState$1 as Gi, ReasoningEncryptedValueSubtypeSchema as Gn, ToolsCapabilitiesSchema as Gr, AssistantMessageSchema as Gt, useLearningContainersInCurrentThread as H, transformHttpEventStream as Hi, RawEventSchema as Hn, ToolCallStatus$1 as Hr, AgentCapabilitiesSchema as Ht, CopilotChatSuggestionPill as I, runHttpRequest as Ii, MultimodalCapabilitiesSchema as In, ToolCallArgsEventSchema as Ir, AGUIError as It, useThreads$1 as J, ɵTHREAD_REQUEST_TIMEOUT_MS as Ji, ReasoningMessageContentEventSchema as Jn, VideoInputContentSchema as Jr, BackwardCompatibility_0_0_39 as Jt, useLearnFromUserAction as K, ɵMAX_SOCKET_RETRIES as Ki, ReasoningEndEventSchema as Kn, TransportCapabilitiesSchema as Kr, AudioInputContentSchema as Kt, CopilotChatReasoningMessage_default as L, select as Li, MultimodalInputCapabilitiesSchema as Ln, ToolCallChunkEventSchema as Lr, AGUI_METADATA_KEY as Lt, IntelligenceIndicator as M, props as Mi, MessagesSnapshotEventSchema as Mn, ThinkingTextMessageContentEventSchema as Mr, CopilotChatAudioRecorder as Mt, getIntelligenceTurnAnchors as N, randomUUID$2 as Ni, MetadataSchema as Nn, ThinkingTextMessageEndEventSchema as Nr, CopilotChatConfigurationProvider as Nt, CopilotChatView_default as O, onInspectorViewThreadResult as Oi, InterruptSchema as On, TextMessageEndEventSchema as Or, CopilotKitInspector as Ot, IntelligenceIndicatorView as P, resolveAgentDebugConfig as Pi, Middleware as Pn, ThinkingTextMessageStartEventSchema as Pr, useCopilotChatConfiguration as Pt, useSuggestions as Q, ɵisCopilotKitFeature as Qi, ReasoningStartEventSchema as Qn, buildResumeArray as Qr, BaseEventSchema as Qt, CopilotChatUserMessage_default as R, structuredClone_ as Ri, MultimodalOutputCapabilitiesSchema as Rn, ToolCallEndEventSchema as Rr, AbstractAgent$1 as Rt, CopilotSidebarView as S, ɵselectThreads$1 as Sa, mergeMetadata as Si, ImageInputPartSchema as Sn, SubagentStartedEventSchema as Sr, SandboxFunctionsContext as St, DefaultCloseIcon as T, ɵthreadAdapterEvents as Ta, onInspectorActiveThread as Ti, InputContentSourceSchema as Tn, TextInputContentSchema as Tr, MCPAppsActivityRenderer as Tt, useLearningContainers as U, verifyEvents as Ui, ReasoningCapabilitiesSchema as Un, ToolMessageSchema as Ur, AgentRegistry as Ut, CopilotChatToolCallsView as V, transformChunks as Vi, ProxiedCopilotRuntimeAgent$1 as Vn, ToolCallStartEventSchema as Vr, ActivitySnapshotEventSchema as Vt, useAttachments as W, ɵCOPILOTKIT_FEATURES as Wi, ReasoningEncryptedValueEventSchema as Wn, ToolSchema as Wr, AgentThreadLockedError as Wt, INTERRUPT_EVENT_NAME as X, ɵcreateThreadSelectors as Xi, ReasoningMessageSchema as Xn, WebMCPRegistry as Xr, BackwardCompatibility_0_0_47 as Xt, useInterrupt as Y, ɵcreateMemoryStore as Yi, ReasoningMessageEndEventSchema as Yn, VideoInputPartSchema as Yr, BackwardCompatibility_0_0_45 as Yt, useConfigureSuggestions as Z, ɵcreateThreadStore$1 as Zi, ReasoningMessageStartEventSchema as Zn, aggregateTokenUsage as Zr, BackwardCompatibility_0_0_57 as Zt, WildcardToolCallRender as _, ɵselectMemoriesAvailable$1 as _a, getWebMCPModelContext as _i, HttpAgent$1 as _n, SubagentErrorEventSchema as _r, GenerateSandboxedUiArgsSchema as _t, ThreadsProvider as a, ɵmemoryRestEvents as aa, createInspectorThreadRequestId as ai, CopilotKitCoreRuntimeConnectionStatus$1 as an, RunFinishedOutcomeSchema as ar, useRenderTool as at, CopilotSidebar as b, ɵselectMemoriesIsMutating as ba, isInterruptExpired as bi, IdentityCapabilitiesSchema as bn, SubagentFinishedSuccessOutcomeSchema as br, OpenGenerativeUIContentSchema as bt, CoAgentStateRendersProvider as c, ɵobservePhoenixSocketHealth$ as ca, createStore as ci, DeveloperMessageSchema as cn, RunStartedEventSchema as cr, useFrontendTool as ct, shouldShowDevConsole as d, ɵphoenixSocket$ as da, emitInspectorStopViewing as di, EventSchemas as dn, StateManager as dr, CopilotKitProvider as dt, ɵjoinPhoenixChannel$ as ea, completePartialMarkdown as ei, BinaryInputContentSchema as en, RoleSchema as er, useCapabilities as et, useToast as f, ɵselectFetchMoreError$1 as fa, emitInspectorViewThread as fi, EventType as fn, StateSchema as fr, useCopilotKit$1 as ft, useCopilotContext as g, ɵselectMemories$1 as ga, getRunOutcome as gi, FunctionMiddleware as gn, SubAgentInfoSchema as gr, createA2UIMessageRenderer as gt, CopilotContext as h, ɵselectIsMutating$1 as ha, ensureObjectArgs as hi, FunctionCallSchema as hn, StepStartedEventSchema as hr, defineToolCallRenderer as ht, ThreadsContext as i, ɵmemoryReducer as ia, createEffect as ii, CopilotKitCoreErrorCode$1 as in, RunFinishedInterruptOutcomeSchema as ir, useDefaultRenderTool as it, INTELLIGENCE_TURN_HEAD as j, parseToolArguments as ji, MessageSchema as jn, ThinkingStartEventSchema as jr, AudioRecorderError as jt, CopilotChatAttachmentQueue as k, parseProtoStream as ki, MEMORY_ERROR_REGISTRY as kn, TextMessageStartEventSchema as kr, useRenderToolCall as kt, useCoAgentStateRenders as l, ɵobservePhoenixSocketSignals$ as la, defaultApplyEvents as li, DocumentInputContentSchema as ln, StateCapabilitiesSchema as lr, useRenderActivityMessage as lt, useCopilotMessagesContext as m, ɵselectIsFetchingNextPage$1 as ma, empty as mi, FilterToolCallsMiddleware as mn, StepFinishedEventSchema as mr, CopilotKitCoreReact as mt, defaultCopilotContextCategories as n, ɵmemoryAdapterEvents as na, createActionGroup as ni, ContextStore as nn, RunErrorEventSchema as nr, useAgent as nt, useThreads as o, ɵobservePhoenixEvent$ as oa, createReducer as oi, CustomEventSchema as on, RunFinishedSuccessOutcomeSchema as or, useComponent as ot, CopilotMessagesContext as p, ɵselectHasNextPage$1 as pa, emitInspectorViewThreadResult$1 as pi, ExecutionCapabilitiesSchema as pn, StateSnapshotEventSchema as pr, useLicenseContext$1 as pt, useMemories as q, ɵRUNTIME_PROBE_TIMEOUT_MS as qi, ReasoningMessageChunkEventSchema as qn, UserMessageSchema as qr, AudioInputPartSchema as qt, CoAgentStateRenderBridge as r, ɵmemoryDomainEvents as ra, createDebugLogger as ri, CopilotKitCore$1 as rn, RunFinishedEventSchema as rr, useHumanInTheLoop as rt, CoAgentStateRendersContext as s, ɵobservePhoenixJoinOutcome$ as sa, createSelector as si, DebugLogger as sn, RunHandler as sr, useFrontendTools as st, CopilotKit as t, ɵmapMemoryMetadataEvent as ta, convertToLegacyEvents as ti, ContextSchema as tn, RunAgentInputSchema as tr, UseAgentUpdate as tt, useAsyncCallback as u, ɵphoenixChannel$ as ua, emitInspectorActiveThread$1 as ui, DocumentInputPartSchema as un, StateDeltaEventSchema as ur, useRenderCustomMessages as ut, CopilotThreadsDrawer as v, ɵselectMemoriesError$1 as va, isAbortError as vi, HumanInTheLoopCapabilitiesSchema as vn, SubagentFinishedEventSchema as vr, OpenGenerativeUIActivityRenderer as vt, CopilotChatToggleButton as w, ɵselectThreadsIsLoading$1 as wa, on as wi, InputContentSchema as wn, SystemMessageSchema as wr, MCPAppsActivityContentSchema as wt, CopilotPopupView as x, ɵselectMemoriesRealtimeStatus$1 as xa, isRunCompletionAware$1 as xi, ImageInputContentSchema as xn, SubagentFinishedSuspendedOutcomeSchema as xr, OpenGenerativeUIToolRenderer as xt, CopilotPopup as y, ɵselectMemoriesIsLoading$1 as ya, isInspectorThreadBridgeEnabled$1 as yi, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID as yn, SubagentFinishedOutcomeSchema as yr, OpenGenerativeUIActivityType as yt, CopilotChatAttachmentRenderer as z, tokenUsageFromAiSdkUsage as zi, OptionalMetadataSchema as zn, ToolCallResultEventSchema as zr, ActivityDeltaEventSchema as zt };
12585
- //# sourceMappingURL=copilotkit-CoWG8EAX.mjs.map
12575
+ //# sourceMappingURL=copilotkit-D9iy3p2l.mjs.map