@copilotkit/react-core 1.81.0 → 1.83.0

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.
Files changed (44) hide show
  1. package/dist/{MarkdownSurfaces-L67964_B.mjs → MarkdownSurfaces-DGpjmPaB.mjs} +11 -2
  2. package/dist/MarkdownSurfaces-DGpjmPaB.mjs.map +1 -0
  3. package/dist/{MarkdownSurfaces-D-OkjUpU.cjs → MarkdownSurfaces-FF5za2kU.cjs} +11 -2
  4. package/dist/MarkdownSurfaces-FF5za2kU.cjs.map +1 -0
  5. package/dist/{copilotkit-BjllYYjw.cjs → copilotkit-BuIuo-Z1.cjs} +165 -100
  6. package/dist/copilotkit-BuIuo-Z1.cjs.map +1 -0
  7. package/dist/{copilotkit-BEcaM4L4.d.mts → copilotkit-C765tOUi.d.mts} +46 -3
  8. package/dist/copilotkit-C765tOUi.d.mts.map +1 -0
  9. package/dist/{copilotkit-fKrKqoiP.mjs → copilotkit-DyxwF9wL.mjs} +165 -100
  10. package/dist/copilotkit-DyxwF9wL.mjs.map +1 -0
  11. package/dist/{copilotkit-D9jIImy9.d.cts → copilotkit-wqaNanhw.d.cts} +46 -3
  12. package/dist/copilotkit-wqaNanhw.d.cts.map +1 -0
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.d.cts +1 -1
  15. package/dist/index.d.mts +1 -1
  16. package/dist/index.mjs +2 -2
  17. package/dist/index.umd.js +12 -3
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/v2/generative-ui.cjs +1 -1
  20. package/dist/v2/generative-ui.d.cts +54 -54
  21. package/dist/v2/generative-ui.d.mts +54 -54
  22. package/dist/v2/generative-ui.mjs +1 -1
  23. package/dist/v2/headless.cjs +10 -1
  24. package/dist/v2/headless.cjs.map +1 -1
  25. package/dist/v2/headless.d.cts +9 -0
  26. package/dist/v2/headless.d.cts.map +1 -1
  27. package/dist/v2/headless.d.mts +9 -0
  28. package/dist/v2/headless.d.mts.map +1 -1
  29. package/dist/v2/headless.mjs +10 -1
  30. package/dist/v2/headless.mjs.map +1 -1
  31. package/dist/v2/index.cjs +2 -2
  32. package/dist/v2/index.css +1 -1
  33. package/dist/v2/index.d.cts +1 -1
  34. package/dist/v2/index.d.mts +1 -1
  35. package/dist/v2/index.mjs +2 -2
  36. package/dist/v2/index.umd.js +173 -99
  37. package/dist/v2/index.umd.js.map +1 -1
  38. package/package.json +8 -8
  39. package/dist/MarkdownSurfaces-D-OkjUpU.cjs.map +0 -1
  40. package/dist/MarkdownSurfaces-L67964_B.mjs.map +0 -1
  41. package/dist/copilotkit-BEcaM4L4.d.mts.map +0 -1
  42. package/dist/copilotkit-BjllYYjw.cjs.map +0 -1
  43. package/dist/copilotkit-D9jIImy9.d.cts.map +0 -1
  44. package/dist/copilotkit-fKrKqoiP.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { A as isRecord, B as useCopilotChatConfiguration, C as validateSchemaSync, D as BASIC_FUNCTIONS, E as getMarkdownSurfaceSource, F as defineToolCallRenderer, H as useShallowStableRef, I as useKatexStyles, L as ControlledModalOpenScope, M as componentCatalogIds, O as ExpressionError, P as toJsonSchema, R as CopilotChatConfigurationProvider, S as issueKey, T as containsDynamicValue, V as shallowEqual, _ as GenerativeUIRuntimeContext, a as createGenerativeUIActivityRenderer, b as formatIssues, i as GenerativeUIToolCallRenderer, j as catalogIdsOf, k as GenerativeUIError, o as createGenerativeUIFunctionCallActivityRenderer, r as GenerativeUIChatSlotContext, t as MarkdownSurfaces, v as useGenerativeUIRuntime, w as withoutRejectedNulls, x as isAsyncIssue, z as CopilotChatDefaultLabels } from "./MarkdownSurfaces-L67964_B.mjs";
1
+ import { A as isRecord, B as useCopilotChatConfiguration, C as validateSchemaSync, D as BASIC_FUNCTIONS, E as getMarkdownSurfaceSource, F as defineToolCallRenderer, H as useShallowStableRef, I as useKatexStyles, L as ControlledModalOpenScope, M as componentCatalogIds, O as ExpressionError, P as toJsonSchema, R as CopilotChatConfigurationProvider, S as issueKey, T as containsDynamicValue, V as shallowEqual, _ as GenerativeUIRuntimeContext, a as createGenerativeUIActivityRenderer, b as formatIssues, i as GenerativeUIToolCallRenderer, j as catalogIdsOf, k as GenerativeUIError, o as createGenerativeUIFunctionCallActivityRenderer, r as GenerativeUIChatSlotContext, t as MarkdownSurfaces, v as useGenerativeUIRuntime, w as withoutRejectedNulls, x as isAsyncIssue, z as CopilotChatDefaultLabels } from "./MarkdownSurfaces-DGpjmPaB.mjs";
2
2
  import * as React$1 from "react";
3
3
  import React, { Fragment, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, WebMCPRegistry, classifySurfaceCards, completePartialMarkdown, createActionGroup, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, emitInspectorActiveThread, emitInspectorActiveThread as emitInspectorActiveThread$1, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, emitInspectorViewThreadResult as emitInspectorViewThreadResult$1, empty, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations as extractFenceOperations$1, extractStringField, flattenInformationalCards as flattenInformationalCards$1, getMarkdownOperationSurfaceId as getMarkdownOperationSurfaceId$1, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInspectorThreadBridgeEnabled as isInspectorThreadBridgeEnabled$1, isRunCompletionAware, isRunCompletionAware as isRunCompletionAware$1, ofType, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorStopViewing as onInspectorStopViewing$1, onInspectorViewThread, onInspectorViewThread as onInspectorViewThread$1, onInspectorViewThreadResult, parseToolArguments, prepareSurfaceOperations as prepareSurfaceOperations$1, props, segmentSurfaceProse as segmentSurfaceProse$1, select, splitA2UIMarkdown as splitA2UIMarkdown$1, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisHttpAgent as ɵisHttpAgent$1, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵselectFetchMoreError, ɵselectFetchMoreError as ɵselectFetchMoreError$1, ɵselectHasNextPage, ɵselectHasNextPage as ɵselectHasNextPage$1, ɵselectIsFetchingNextPage, ɵselectIsFetchingNextPage as ɵselectIsFetchingNextPage$1, ɵselectIsMutating, ɵselectIsMutating as ɵselectIsMutating$1, ɵselectMemories, ɵselectMemories as ɵselectMemories$1, ɵselectMemoriesAvailable, ɵselectMemoriesAvailable as ɵselectMemoriesAvailable$1, ɵselectMemoriesError, ɵselectMemoriesError as ɵselectMemoriesError$1, ɵselectMemoriesIsLoading, ɵselectMemoriesIsLoading as ɵselectMemoriesIsLoading$1, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectMemoriesRealtimeStatus as ɵselectMemoriesRealtimeStatus$1, ɵselectThreads, ɵselectThreads as ɵselectThreads$1, ɵselectThreadsError, ɵselectThreadsError as ɵselectThreadsError$1, ɵselectThreadsIsLoading, ɵselectThreadsIsLoading as ɵselectThreadsIsLoading$1, ɵthreadAdapterEvents, ɵwithHeaderDefaults, ɵwithHeaderDefaults as ɵwithHeaderDefaults$1 } from "@copilotkit/core";
@@ -921,13 +921,13 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
921
921
  const slashMenu = slashMenuVisible ? /* @__PURE__ */ jsx("div", {
922
922
  "data-testid": "copilot-slash-menu",
923
923
  role: "listbox",
924
- "aria-label": "Slash commands",
924
+ "aria-label": labels.chatInputSlashMenuLabel,
925
925
  ref: slashMenuRef,
926
926
  className: "cpk:absolute cpk:bottom-full cpk:left-0 cpk:right-0 cpk:z-30 cpk:mb-2 cpk:max-h-64 cpk:overflow-y-auto cpk:rounded-lg cpk:border cpk:border-border cpk:bg-white cpk:shadow-lg cpk:dark:border-[#3a3a3a] cpk:dark:bg-[#1f1f1f]",
927
927
  style: { maxHeight: `${SLASH_MENU_MAX_VISIBLE_ITEMS * SLASH_MENU_ITEM_HEIGHT_PX}px` },
928
928
  children: filteredCommands.length === 0 ? /* @__PURE__ */ jsx("div", {
929
929
  className: "cpk:px-3 cpk:py-2 cpk:text-sm cpk:text-muted-foreground",
930
- children: "No commands found"
930
+ children: labels.chatInputSlashMenuEmptyText
931
931
  }) : filteredCommands.map((item, index) => {
932
932
  const isActive = index === slashHighlightIndex;
933
933
  return /* @__PURE__ */ jsx("button", {
@@ -1322,7 +1322,7 @@ function useRenderToolCall() {
1322
1322
 
1323
1323
  //#endregion
1324
1324
  //#region package.json
1325
- var version = "1.81.0";
1325
+ var version = "1.83.0";
1326
1326
 
1327
1327
  //#endregion
1328
1328
  //#region src/v2/components/CopilotKitInspector.tsx
@@ -2907,7 +2907,7 @@ function A2UIBuiltInToolCallRenderer() {
2907
2907
  */
2908
2908
  function A2UICatalogContext({ catalog, includeSchema }) {
2909
2909
  const { copilotkit } = useCopilotKit$1();
2910
- const capabilitiesValue = useMemo(() => buildCatalogContextValue(catalog), [catalog]);
2910
+ const capabilitiesValue = useMemo(() => buildCatalogContextValue(catalog, { includeSchema: includeSchema !== false }), [catalog, includeSchema]);
2911
2911
  const schemaValue = useMemo(() => includeSchema !== false ? JSON.stringify(extractCatalogComponentSchemas(catalog)) : null, [catalog, includeSchema]);
2912
2912
  const a2uiAgentsKey = copilotkit?.a2uiAgents?.join(",");
2913
2913
  useLayoutEffect(() => {
@@ -6001,14 +6001,14 @@ function ToolCallRow({ name, parameters, result, status, appearance, className,
6001
6001
  const line = appearance === "line";
6002
6002
  return /* @__PURE__ */ jsxs("div", {
6003
6003
  "data-copilotkit": true,
6004
- className: twMerge(!line && "cpk:border-t cpk:border-border", className),
6004
+ className: twMerge(appearance === "card" && "cpk:border-t cpk:border-border", className),
6005
6005
  ...props,
6006
6006
  children: [/* @__PURE__ */ jsxs("button", {
6007
6007
  type: "button",
6008
6008
  "aria-expanded": open,
6009
6009
  "aria-controls": detailsId,
6010
6010
  onClick: () => setOpen((value) => !value),
6011
- className: twMerge("cpk:group/row cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:gap-2 cpk:border-none cpk:bg-transparent cpk:text-left cpk:text-[13px] cpk:text-inherit cpk:transition-colors cpk:hover:bg-accent/60 cpk:focus-visible:outline-2 cpk:focus-visible:-outline-offset-2 cpk:focus-visible:outline-ring", line ? "cpk:-mx-1.5 cpk:w-[calc(100%+0.75rem)] cpk:rounded-md cpk:px-1.5 cpk:py-1" : "cpk:w-full cpk:px-3.5 cpk:py-2"),
6011
+ className: twMerge("cpk:group/row cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:gap-2 cpk:border-none cpk:bg-transparent cpk:text-left cpk:text-[13px] cpk:text-inherit cpk:transition-colors cpk:hover:bg-accent/60 cpk:focus-visible:outline-2 cpk:focus-visible:-outline-offset-2 cpk:focus-visible:outline-ring", line ? "cpk:-mx-1.5 cpk:w-[calc(100%+0.75rem)] cpk:rounded-md cpk:px-1.5 cpk:py-1" : appearance === "stack" ? "cpk:w-full cpk:px-3.5 cpk:py-2.5" : "cpk:w-full cpk:px-3.5 cpk:py-2"),
6012
6012
  children: [
6013
6013
  /* @__PURE__ */ jsx(StatusIcon, { status }),
6014
6014
  /* @__PURE__ */ jsx("span", {
@@ -6048,7 +6048,8 @@ function ToolCallRow({ name, parameters, result, status, appearance, className,
6048
6048
  *
6049
6049
  * Each call is drawn by its registered renderer. CopilotKit's built-in card
6050
6050
  * (`useDefaultRenderTool`) draws a compact row inside the card and line
6051
- * appearances; a custom wildcard renderer draws whatever it draws.
6051
+ * appearances and an open stack; a custom wildcard renderer draws whatever it
6052
+ * draws.
6052
6053
  */
6053
6054
  function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isActive = false, className, ...props }) {
6054
6055
  const [open, setOpen] = useState(false);
@@ -6127,11 +6128,6 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
6127
6128
  });
6128
6129
  }
6129
6130
  if (appearance === "stack") {
6130
- if (calls.length === 1) return /* @__PURE__ */ jsx("div", {
6131
- ...groupProps,
6132
- className: twMerge("cpk:py-1", className),
6133
- children: renderCall(latest)
6134
- });
6135
6131
  const behind = open ? 0 : Math.min(calls.length - 1, 2);
6136
6132
  const layer = "cpk:rounded-xl cpk:border cpk:border-border cpk:bg-card cpk:text-card-foreground";
6137
6133
  const latestStatus = entryStatus(latest, isActive);
@@ -6145,68 +6141,88 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
6145
6141
  },
6146
6142
  children: [/* @__PURE__ */ jsxs("div", {
6147
6143
  className: "cpk:relative cpk:isolate",
6148
- children: [Array.from({ length: behind }, (_, index) => /* @__PURE__ */ jsx("div", {
6149
- "aria-hidden": "true",
6150
- className: twMerge(layer, "cpk:absolute cpk:inset-0"),
6151
- style: {
6152
- transform: `translateY(${(index + 1) * 6}px) scaleX(${1 - (index + 1) * .045})`,
6153
- zIndex: -1 - index,
6154
- opacity: 1 - (index + 1) * .28
6155
- }
6156
- }, index)), /* @__PURE__ */ jsx("button", {
6157
- type: "button",
6158
- "aria-expanded": open,
6159
- "aria-controls": open ? bodyId : void 0,
6160
- onClick: () => setOpen((value) => !value),
6161
- className: twMerge("cpk:relative cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:text-left cpk:transition-colors cpk:focus-visible:outline-2 cpk:focus-visible:outline-ring", open ? "cpk:mb-1 cpk:gap-1.5 cpk:rounded-md cpk:border-none cpk:bg-transparent cpk:p-0 cpk:py-0.5 cpk:text-xs cpk:text-muted-foreground cpk:hover:text-foreground" : twMerge(layer, "cpk:w-full cpk:gap-2 cpk:px-3.5 cpk:py-2.5 cpk:text-[13px] cpk:shadow-[0_1px_2px_rgb(0_0_0/0.04)] cpk:hover:bg-accent")),
6162
- children: open ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
6163
- pluralize(calls.length, "tool call"),
6164
- /* @__PURE__ */ jsx(FailedCount, { calls }),
6165
- /* @__PURE__ */ jsx(Chevron, {
6166
- open: true,
6167
- className: "cpk:-rotate-90"
6168
- }),
6169
- "Collapse"
6170
- ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
6171
- className: "cpk:flex cpk:min-w-0 cpk:flex-1 cpk:items-center cpk:gap-2 cpk:animate-[cpk-stack-drop_260ms_cubic-bezier(0.16,1,0.3,1)] cpk:motion-reduce:animate-none",
6172
- children: [
6173
- /* @__PURE__ */ jsx(StatusIcon, { status: latestStatus }),
6174
- /* @__PURE__ */ jsx("span", {
6175
- className: twMerge("cpk:shrink-0 cpk:font-mono cpk:font-medium cpk:text-foreground", latestStatus === "running" && "cpk-shimmer"),
6176
- children: latest.toolCall.function.name
6177
- }),
6178
- latestPreview && /* @__PURE__ */ jsx("span", {
6179
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-muted-foreground",
6180
- children: latestPreview
6181
- })
6182
- ]
6183
- }, latest.toolCall.id), /* @__PURE__ */ jsxs("span", {
6184
- className: "cpk:ml-2 cpk:inline-flex cpk:shrink-0 cpk:items-center cpk:gap-2 cpk:text-xs cpk:text-muted-foreground",
6185
- children: [
6144
+ children: [
6145
+ Array.from({ length: behind }, (_, index) => /* @__PURE__ */ jsx("div", {
6146
+ "aria-hidden": "true",
6147
+ className: twMerge(layer, "cpk:absolute cpk:inset-0"),
6148
+ style: {
6149
+ transform: `translateY(${(index + 1) * 6}px) scaleX(${1 - (index + 1) * .045})`,
6150
+ zIndex: -1 - index,
6151
+ opacity: 1 - (index + 1) * .28
6152
+ }
6153
+ }, index)),
6154
+ /* @__PURE__ */ jsx("button", {
6155
+ type: "button",
6156
+ "aria-expanded": open,
6157
+ "aria-controls": open ? bodyId : void 0,
6158
+ onClick: () => setOpen((value) => !value),
6159
+ className: twMerge("cpk:relative cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:text-left cpk:transition-colors cpk:focus-visible:outline-2 cpk:focus-visible:outline-ring", open ? "cpk:mb-1.5 cpk:w-full cpk:gap-1.5 cpk:rounded-md cpk:border-none cpk:bg-transparent cpk:p-0 cpk:py-0.5 cpk:text-xs cpk:text-muted-foreground cpk:hover:text-foreground" : twMerge(layer, "cpk:w-full cpk:gap-2 cpk:px-3.5 cpk:py-2.5 cpk:text-[13px] cpk:shadow-[0_1px_2px_rgb(0_0_0/0.04)] cpk:hover:bg-accent")),
6160
+ children: open ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
6161
+ pluralize(calls.length, "tool call"),
6186
6162
  /* @__PURE__ */ jsx(FailedCount, { calls }),
6187
- /* @__PURE__ */ jsx("span", {
6188
- className: "cpk:tabular-nums",
6189
- children: pluralize(calls.length, "call")
6190
- }),
6191
- /* @__PURE__ */ jsx(Chevron, {
6192
- open: false,
6193
- className: "cpk:rotate-90"
6163
+ /* @__PURE__ */ jsxs("span", {
6164
+ className: "cpk:ml-auto cpk:inline-flex cpk:items-center cpk:gap-1",
6165
+ children: ["Collapse", /* @__PURE__ */ jsx(Chevron, {
6166
+ open: true,
6167
+ className: "cpk:-rotate-90"
6168
+ })]
6194
6169
  })
6195
- ]
6196
- })] })
6197
- })]
6170
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
6171
+ className: "cpk:flex cpk:min-w-0 cpk:flex-1 cpk:items-center cpk:gap-2 cpk:animate-[cpk-stack-drop_260ms_cubic-bezier(0.16,1,0.3,1)] cpk:motion-reduce:animate-none",
6172
+ children: [
6173
+ /* @__PURE__ */ jsx(StatusIcon, { status: latestStatus }),
6174
+ /* @__PURE__ */ jsx("span", {
6175
+ className: twMerge("cpk:shrink-0 cpk:font-mono cpk:font-medium cpk:text-foreground", latestStatus === "running" && "cpk-shimmer"),
6176
+ children: latest.toolCall.function.name
6177
+ }),
6178
+ latestPreview && /* @__PURE__ */ jsx("span", {
6179
+ className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-muted-foreground",
6180
+ children: latestPreview
6181
+ }),
6182
+ /* @__PURE__ */ jsx("span", {
6183
+ className: "cpk:sr-only",
6184
+ children: statusLabels[latestStatus]
6185
+ })
6186
+ ]
6187
+ }, latest.toolCall.id), /* @__PURE__ */ jsxs("span", {
6188
+ className: "cpk:ml-2 cpk:inline-flex cpk:shrink-0 cpk:items-center cpk:gap-2 cpk:text-xs cpk:text-muted-foreground",
6189
+ children: [
6190
+ /* @__PURE__ */ jsx(FailedCount, { calls }),
6191
+ /* @__PURE__ */ jsx("span", {
6192
+ className: "cpk:tabular-nums",
6193
+ children: pluralize(calls.length, "call")
6194
+ }),
6195
+ /* @__PURE__ */ jsx(Chevron, {
6196
+ open: false,
6197
+ className: "cpk:rotate-90"
6198
+ })
6199
+ ]
6200
+ })] })
6201
+ }),
6202
+ /* @__PURE__ */ jsx("span", {
6203
+ "aria-live": "polite",
6204
+ className: "cpk:sr-only",
6205
+ children: open ? "" : `${latest.toolCall.function.name}: ${statusLabels[latestStatus]}`
6206
+ })
6207
+ ]
6198
6208
  }), open && /* @__PURE__ */ jsx("div", {
6199
6209
  id: bodyId,
6200
- className: "cpk:[&>*]:animate-[cpk-stack-fan_300ms_cubic-bezier(0.16,1,0.3,1)_both] cpk:motion-reduce:[&>*]:animate-none",
6201
- children: calls.map((call) => /* @__PURE__ */ jsx(React.Fragment, { children: renderCall(call) }, call.toolCall.id))
6210
+ className: "cpk:grid cpk:gap-1.5",
6211
+ children: /* @__PURE__ */ jsx(ToolCallGroupContext.Provider, {
6212
+ value: {
6213
+ appearance: "stack",
6214
+ failedIds,
6215
+ active: isActive
6216
+ },
6217
+ children: calls.map((call, index) => /* @__PURE__ */ jsx("div", {
6218
+ className: twMerge(layer, "cpk:overflow-hidden cpk:shadow-[0_1px_2px_rgb(0_0_0/0.04)] cpk:animate-[cpk-stack-fan_240ms_cubic-bezier(0.16,1,0.3,1)_both] cpk:motion-reduce:animate-none"),
6219
+ style: { animationDelay: `${index * 30}ms` },
6220
+ children: renderCall(call)
6221
+ }, call.toolCall.id))
6222
+ })
6202
6223
  })]
6203
6224
  });
6204
6225
  }
6205
- if (calls.length === 1) return /* @__PURE__ */ jsx("div", {
6206
- ...groupProps,
6207
- className: twMerge("cpk:py-1", className),
6208
- children: renderCall(latest)
6209
- });
6210
6226
  return /* @__PURE__ */ jsxs("div", {
6211
6227
  ...groupProps,
6212
6228
  className: twMerge("cpk:my-3 cpk:overflow-hidden cpk:rounded-xl cpk:border cpk:border-border cpk:bg-card cpk:text-card-foreground", className),
@@ -6229,7 +6245,7 @@ function CopilotChatToolCallGroup({ calls, renderCall, appearance = "card", isAc
6229
6245
  className: "cpk:ml-auto cpk:flex cpk:shrink-0 cpk:items-center cpk:gap-2 cpk:pl-2 cpk:text-xs cpk:text-muted-foreground",
6230
6246
  children: [status === "failed" ? /* @__PURE__ */ jsx(FailedCount, { calls }) : /* @__PURE__ */ jsx("span", {
6231
6247
  className: "cpk:tabular-nums",
6232
- children: status === "running" ? `${done} done` : statusLabels[status]
6248
+ children: status !== "running" ? statusLabels[status] : done > 0 && `${done} done`
6233
6249
  }), /* @__PURE__ */ jsx(Chevron, { open })]
6234
6250
  })
6235
6251
  ]
@@ -9340,7 +9356,13 @@ var CopilotChatAssistantMessage_default = CopilotChatAssistantMessage;
9340
9356
 
9341
9357
  //#endregion
9342
9358
  //#region src/v2/components/chat/Lightbox.tsx
9359
+ /**
9360
+ * A full-screen preview portalled to `document.body`. It closes on Escape, a
9361
+ * click on the backdrop, or its close button, which is named by
9362
+ * `labels.attachmentPreviewCloseButtonLabel`.
9363
+ */
9343
9364
  function Lightbox({ onClose, children }) {
9365
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
9344
9366
  useEffect(() => {
9345
9367
  const handleKey = (e) => {
9346
9368
  if (e.key === "Escape") onClose();
@@ -9355,7 +9377,7 @@ function Lightbox({ onClose, children }) {
9355
9377
  children: [/* @__PURE__ */ jsx("button", {
9356
9378
  onClick: onClose,
9357
9379
  className: "cpk:absolute cpk:top-4 cpk:right-4 cpk:text-white cpk:bg-white/10 cpk:hover:bg-white/20 cpk:rounded-full cpk:w-10 cpk:h-10 cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer cpk:border-none cpk:z-10",
9358
- "aria-label": "Close preview",
9380
+ "aria-label": labels.attachmentPreviewCloseButtonLabel,
9359
9381
  children: /* @__PURE__ */ jsx(X, { className: "cpk:w-5 cpk:h-5" })
9360
9382
  }), /* @__PURE__ */ jsx("div", {
9361
9383
  onClick: (e) => e.stopPropagation(),
@@ -9708,7 +9730,14 @@ function formatDuration$1(seconds) {
9708
9730
  if (secs === 0) return `${mins} minute${mins > 1 ? "s" : ""}`;
9709
9731
  return `${mins}m ${secs}s`;
9710
9732
  }
9733
+ /**
9734
+ * A reasoning message as a collapsible block. While the model reasons it is
9735
+ * open and the header shows `labels.reasoningMessageThinkingLabel`; when
9736
+ * streaming ends it collapses and the header reads "Thought for …". The
9737
+ * `header` slot also receives `elapsedSeconds`.
9738
+ */
9711
9739
  function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: isLatestProp, header, contentView, toggle, children, className, ...props }) {
9740
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
9712
9741
  const isLatest = isLatestProp ?? messages?.[messages.length - 1]?.id === message.id;
9713
9742
  const isStreaming = !!(isRunning && isLatest);
9714
9743
  const hasContent = !!(message.content && message.content.length > 0);
@@ -9738,12 +9767,13 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
9738
9767
  userToggledRef.current = true;
9739
9768
  setIsOpen((prev) => !prev);
9740
9769
  } : void 0;
9741
- const label = isStreaming ? "Thinking…" : `Thought for ${formatDuration$1(elapsed)}`;
9770
+ const label = isStreaming ? labels.reasoningMessageThinkingLabel : `Thought for ${formatDuration$1(elapsed)}`;
9742
9771
  const boundHeader = renderSlot(header, CopilotChatReasoningMessage.Header, {
9743
9772
  isOpen,
9744
9773
  label,
9745
9774
  hasContent,
9746
9775
  isStreaming,
9776
+ elapsedSeconds: elapsed,
9747
9777
  onClick: handleToggle
9748
9778
  });
9749
9779
  const boundContent = renderSlot(contentView, CopilotChatReasoningMessage.Content, {
@@ -9775,7 +9805,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
9775
9805
  });
9776
9806
  }
9777
9807
  (function(_CopilotChatReasoningMessage) {
9778
- _CopilotChatReasoningMessage.Header = ({ isOpen, label = "Thoughts", hasContent, isStreaming, className, children: headerChildren, ...headerProps }) => {
9808
+ _CopilotChatReasoningMessage.Header = ({ isOpen, label = "Thoughts", hasContent, isStreaming, elapsedSeconds: _elapsedSeconds, className, children: headerChildren, ...headerProps }) => {
9779
9809
  const isExpandable = !!hasContent;
9780
9810
  return /* @__PURE__ */ jsxs("button", {
9781
9811
  type: "button",
@@ -11051,7 +11081,12 @@ CopilotChatMessageView.Cursor = function Cursor({ className, ...props }) {
11051
11081
 
11052
11082
  //#endregion
11053
11083
  //#region src/v2/components/chat/CopilotChatAttachmentQueue.tsx
11084
+ /**
11085
+ * The attachments queued in the composer, each with a preview and a remove
11086
+ * button named by `labels.attachmentRemoveButtonLabel`.
11087
+ */
11054
11088
  const CopilotChatAttachmentQueue = ({ attachments, onRemoveAttachment, className }) => {
11089
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
11055
11090
  if (attachments.length === 0) return null;
11056
11091
  return /* @__PURE__ */ jsx("div", {
11057
11092
  "data-testid": "copilot-attachment-queue",
@@ -11066,7 +11101,7 @@ const CopilotChatAttachmentQueue = ({ attachments, onRemoveAttachment, className
11066
11101
  /* @__PURE__ */ jsx("button", {
11067
11102
  onClick: () => onRemoveAttachment(attachment.id),
11068
11103
  className: cn("cpk:absolute cpk:bg-black/60 cpk:text-white cpk:border-none cpk:rounded-full cpk:w-5 cpk:h-5 cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer cpk:text-[10px] cpk:z-20", isMedia ? "cpk:top-1 cpk:right-1" : "cpk:top-1.5 cpk:right-1.5"),
11069
- "aria-label": "Remove attachment",
11104
+ "aria-label": labels.attachmentRemoveButtonLabel,
11070
11105
  children: "✕"
11071
11106
  })
11072
11107
  ]
@@ -11122,7 +11157,13 @@ function AudioPreview({ attachment }) {
11122
11157
  })]
11123
11158
  });
11124
11159
  }
11160
+ /**
11161
+ * A video thumbnail with a play button, named by
11162
+ * `labels.attachmentPlayVideoButtonLabel`, that opens the full player in a
11163
+ * lightbox.
11164
+ */
11125
11165
  function VideoPreview({ attachment }) {
11166
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
11126
11167
  const src = getSourceUrl(attachment.source);
11127
11168
  const { thumbnailRef, vtName, open, openLightbox, closeLightbox } = useLightbox();
11128
11169
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -11143,7 +11184,7 @@ function VideoPreview({ attachment }) {
11143
11184
  /* @__PURE__ */ jsx("button", {
11144
11185
  onClick: openLightbox,
11145
11186
  className: "cpk:absolute cpk:inset-0 cpk:flex cpk:items-center cpk:justify-center cpk:z-10 cpk:cursor-pointer cpk:bg-black/20 cpk:border-none cpk:p-0",
11146
- "aria-label": "Play video",
11187
+ "aria-label": labels.attachmentPlayVideoButtonLabel,
11147
11188
  children: /* @__PURE__ */ jsx("div", {
11148
11189
  className: "cpk:w-8 cpk:h-8 cpk:rounded-full cpk:bg-black/60 cpk:flex cpk:items-center cpk:justify-center",
11149
11190
  children: /* @__PURE__ */ jsx(Play, { className: "cpk:w-4 cpk:h-4 cpk:text-white cpk:ml-0.5" })
@@ -12230,6 +12271,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
12230
12271
  const pendingRunActivityReconnectRef = useRef(false);
12231
12272
  const runActivityReconnectGenerationRef = useRef(0);
12232
12273
  const activeLocalRunIdsRef = useRef(/* @__PURE__ */ new Set());
12274
+ const observedLocalRunIdsRef = useRef(/* @__PURE__ */ new Set());
12233
12275
  const recentlyLocalRunIdsRef = useRef(/* @__PURE__ */ new Map());
12234
12276
  const activeWakeRunIdsRef = useRef(/* @__PURE__ */ new Set());
12235
12277
  const recentlyWakeRunIdsRef = useRef(/* @__PURE__ */ new Map());
@@ -12261,7 +12303,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
12261
12303
  }, []);
12262
12304
  const isLocalActiveRunActivity = useCallback((notification) => {
12263
12305
  if (notification.agentId && notification.agentId !== resolvedAgentId) return false;
12264
- if (!notification.runId || !activeLocalRunIdsRef.current.has(notification.runId) && !recentlyLocalRunIdsRef.current.has(notification.runId)) return false;
12306
+ if (!notification.runId || !activeLocalRunIdsRef.current.has(notification.runId) && !observedLocalRunIdsRef.current.has(notification.runId) && !recentlyLocalRunIdsRef.current.has(notification.runId)) return false;
12265
12307
  const eventType = notification.eventType.toUpperCase();
12266
12308
  return eventType === "RUN_STARTED" || eventType === "RUN_FINISHED" || eventType === "RUN_ERROR";
12267
12309
  }, [resolvedAgentId]);
@@ -12460,6 +12502,16 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
12460
12502
  pendingWakeRunIdRef.current = notification.runId;
12461
12503
  startRunActivityReconnectRef.current?.(generation);
12462
12504
  });
12505
+ const observedLocalRunIds = observedLocalRunIdsRef.current;
12506
+ const localRunSubscription = agent.subscribe({
12507
+ onRunInitialized: ({ input }) => {
12508
+ observedLocalRunIds.add(input.runId);
12509
+ },
12510
+ onRunFinalized: ({ input }) => {
12511
+ observedLocalRunIds.delete(input.runId);
12512
+ rememberRecentlyLocalRunId(input.runId);
12513
+ }
12514
+ });
12463
12515
  return () => {
12464
12516
  detached = true;
12465
12517
  pendingRunActivityReconnectRef.current = false;
@@ -12472,6 +12524,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
12472
12524
  if (wakeReconnectActive) agent.detachActiveRun().catch(() => {});
12473
12525
  activeWakeRunIdsRef.current.clear();
12474
12526
  subscription.unsubscribe();
12527
+ localRunSubscription.unsubscribe();
12475
12528
  if (ownsStandaloneStore) {
12476
12529
  threadStore.setContext(null);
12477
12530
  threadStore.stop();
@@ -12490,6 +12543,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
12490
12543
  copilotkit.threadEndpoints?.realtimeMetadata,
12491
12544
  standaloneRunActivityStore,
12492
12545
  isLocalActiveRunActivity,
12546
+ rememberRecentlyLocalRunId,
12493
12547
  rememberRecentlyWakeRunId
12494
12548
  ]);
12495
12549
  const waitForActiveRunToSettle = useCallback(async () => {
@@ -13011,28 +13065,34 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
13011
13065
  ...props,
13012
13066
  children
13013
13067
  });
13014
- _CopilotModalHeader.CloseButton = ({ className, ...props }) => /* @__PURE__ */ jsx("button", {
13015
- type: "button",
13016
- "data-testid": "copilot-close-button",
13017
- className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
13018
- "aria-label": "Close",
13019
- ...props,
13020
- children: /* @__PURE__ */ jsx(X, {
13021
- className: "cpk:h-4 cpk:w-4",
13022
- "aria-hidden": "true"
13023
- })
13024
- });
13025
- _CopilotModalHeader.DrawerLauncher = ({ className, ...props }) => /* @__PURE__ */ jsx("button", {
13026
- type: "button",
13027
- "data-testid": "copilot-threads-drawer-launcher",
13028
- className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
13029
- "aria-label": "Open threads",
13030
- ...props,
13031
- children: /* @__PURE__ */ jsx(PanelLeftOpen, {
13032
- className: "cpk:h-4 cpk:w-4",
13033
- "aria-hidden": "true"
13034
- })
13035
- });
13068
+ _CopilotModalHeader.CloseButton = ({ className, ...props }) => {
13069
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
13070
+ return /* @__PURE__ */ jsx("button", {
13071
+ type: "button",
13072
+ "data-testid": "copilot-close-button",
13073
+ className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
13074
+ "aria-label": labels.modalHeaderCloseButtonLabel,
13075
+ ...props,
13076
+ children: /* @__PURE__ */ jsx(X, {
13077
+ className: "cpk:h-4 cpk:w-4",
13078
+ "aria-hidden": "true"
13079
+ })
13080
+ });
13081
+ };
13082
+ _CopilotModalHeader.DrawerLauncher = ({ className, ...props }) => {
13083
+ const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
13084
+ return /* @__PURE__ */ jsx("button", {
13085
+ type: "button",
13086
+ "data-testid": "copilot-threads-drawer-launcher",
13087
+ className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
13088
+ "aria-label": labels.modalHeaderThreadsButtonLabel,
13089
+ ...props,
13090
+ children: /* @__PURE__ */ jsx(PanelLeftOpen, {
13091
+ className: "cpk:h-4 cpk:w-4",
13092
+ "aria-hidden": "true"
13093
+ })
13094
+ });
13095
+ };
13036
13096
  })(CopilotModalHeader || (CopilotModalHeader = {}));
13037
13097
  CopilotModalHeader.Title.displayName = "CopilotModalHeader.Title";
13038
13098
  CopilotModalHeader.CloseButton.displayName = "CopilotModalHeader.CloseButton";
@@ -13042,6 +13102,10 @@ CopilotModalHeader.DrawerLauncher.displayName = "CopilotModalHeader.DrawerLaunch
13042
13102
  //#region src/v2/components/chat/CopilotSidebarView.tsx
13043
13103
  const DEFAULT_SIDEBAR_WIDTH = 480;
13044
13104
  const SIDEBAR_TRANSITION_MS = 260;
13105
+ /**
13106
+ * The chat in a side panel: a `complementary` region named by
13107
+ * `labels.sidebarLabel`, with a header, the chat view and a toggle button.
13108
+ */
13045
13109
  function CopilotSidebarView({ header, toggleButton, width, defaultOpen = true, position = "right", ...props }) {
13046
13110
  const { open, onOpenChange } = useModalOpenControl();
13047
13111
  const hasOpenControl = open !== void 0 || onOpenChange !== void 0;
@@ -13062,7 +13126,8 @@ function CopilotSidebarView({ header, toggleButton, width, defaultOpen = true, p
13062
13126
  });
13063
13127
  }
13064
13128
  function CopilotSidebarViewInternal({ header, toggleButton, width, position = "right", ...props }) {
13065
- const isSidebarOpen = useCopilotChatConfiguration()?.isModalOpen ?? false;
13129
+ const configuration = useCopilotChatConfiguration();
13130
+ const isSidebarOpen = configuration?.isModalOpen ?? false;
13066
13131
  const sidebarRef = useRef(null);
13067
13132
  const [sidebarWidth, setSidebarWidth] = useState(width ?? DEFAULT_SIDEBAR_WIDTH);
13068
13133
  const widthToCss = (w) => {
@@ -13127,7 +13192,7 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
13127
13192
  paddingBottom: "env(safe-area-inset-bottom)"
13128
13193
  },
13129
13194
  "aria-hidden": !isSidebarOpen,
13130
- "aria-label": "Copilot chat sidebar",
13195
+ "aria-label": configuration?.labels.sidebarLabel ?? CopilotChatDefaultLabels.sidebarLabel,
13131
13196
  role: "complementary",
13132
13197
  children: /* @__PURE__ */ jsxs("div", {
13133
13198
  className: "cpk:flex cpk:h-full cpk:w-full cpk:flex-col cpk:overflow-hidden",
@@ -15957,4 +16022,4 @@ function validateProps(props) {
15957
16022
 
15958
16023
  //#endregion
15959
16024
  export { INTERRUPT_EVENT_NAME as $, ɵphoenixSocket$ as $a, isAbortError as $i, MultiAgentCapabilitiesSchema as $n, TextMessageEndEventSchema as $r, AudioPartSchema as $t, CopilotChatMessageView as A, withAuthoritativeActivityTypes as Aa, createActionGroup as Ai, HttpAgent as An, RunHandler as Ar, ɵrunMcpFollowUp as At, CopilotChatReasoningMessage_default as B, ɵisHttpAgent$1 as Ba, emitInspectorViewThread as Bi, InputContentUrlSourceSchema as Bn, SubagentFinishedEventSchema as Br, AGUI_METADATA_KEY as Bt, CopilotModalHeader as C, splitA2UIMarkdown$1 as Ca, buildResumeArray as Ci, EventType as Cn, RunAgentInputSchema as Cr, OpenGenerativeUIContentSchema as Ct, CopilotChat as D, transformChunks as Da, contentHasMedia as Di, FilterToolCallsMiddleware as Dn, RunFinishedInterruptOutcomeSchema as Dr, MCPAppsActivityContentSchema as Dt, DefaultOpenIcon as E, tokenUsageFromLangChainMetadata as Ea, completePartialMarkdown as Ei, FileSourceSchema as En, RunFinishedEventSchema as Er, useSandboxFunctions as Et, getIntelligenceTurnAnchors as F, ɵTHREAD_REQUEST_TIMEOUT_MS as Fa, createSelector as Fi, ImageInputPartSchema as Fn, StateSchema as Fr, CopilotChatAudioRecorder as Ft, useLearningContainersInCurrentThread as G, ɵmemoryDomainEvents as Ga, ensureObjectArgs as Gi, JsonPointerSchema as Gn, SubagentRunIdSchema as Gr, AddOperationSchema as Gt, CopilotChatAttachmentRenderer as H, ɵjoinPhoenixChannel$ as Ha, empty as Hi, InterruptSchema as Hn, SubagentFinishedSuccessOutcomeSchema as Hr, ActivityDeltaEventSchema as Ht, IntelligenceIndicatorView as I, ɵcreateMemoryStore as Ia, createStore as Ii, ImagePartSchema as In, StateSnapshotEventSchema as Ir, A2UI_FENCE_LANGUAGE as It, useLearnFromUserActionInCurrentThread as J, ɵobservePhoenixEvent$ as Ja, extractStringField as Ji, MessageSchema as Jn, SystemMessageSchema as Jr, AgentThreadLockedError as Jt, useLearningContainers as K, ɵmemoryReducer as Ka, extractCompleteArrayItems as Ki, MEMORY_ERROR_REGISTRY as Kn, SubagentStartedEventSchema as Kr, AgentCapabilitiesSchema as Kt, CopilotChatWorkSummary as L, ɵcreateThreadSelectors as La, defaultApplyEvents as Li, InputContentDataSourceSchema as Ln, StepFinishedEventSchema as Lr, ACTIVITY_HISTORY_METADATA as Lt, messageRow as M, ɵInterruptState$1 as Ma, createEffect as Mi, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID as Mn, StateCapabilitiesSchema as Mr, useRenderToolCall as Mt, INTELLIGENCE_TURN_HEAD as N, ɵMAX_SOCKET_RETRIES as Na, createInspectorThreadRequestId as Ni, IdentityCapabilitiesSchema as Nn, StateDeltaEventSchema as Nr, CopilotChatInput_default as Nt, CopilotChatView_default as O, transformHttpEventStream as Oa, contentToText$1 as Oi, FunctionCallSchema as On, RunFinishedOutcomeSchema as Or, MCPAppsActivityRenderer as Ot, IntelligenceIndicator as P, ɵRUNTIME_PROBE_TIMEOUT_MS as Pa, createReducer as Pi, ImageInputContentSchema as Pn, StateManager as Pr, AudioRecorderError as Pt, useInterrupt as Q, ɵphoenixChannel$ as Qa, getWebMCPModelContext as Qi, MoveOperationSchema as Qn, TextMessageContentEventSchema as Qr, AudioInputPartSchema as Qt, CopilotChatSuggestionView as R, ɵcreateThreadStore$1 as Ra, emitInspectorActiveThread$1 as Ri, InputContentSchema as Rn, StepStartedEventSchema as Rr, AGUIConnectNotImplementedError$1 as Rt, CopilotSidebarView as S, select as Sa, authoritativeActivityTypes as Si, EventSchemas as Sn, RoleSchema as Sr, OpenGenerativeUIActivityType as St, DefaultCloseIcon as T, tokenUsageFromAiSdkUsage as Ta, compactEvents as Ti, ExecutionCapabilitiesSchema as Tn, RunFinishedCancelledOutcomeSchema as Tr, SandboxFunctionsContext as Tt, CopilotChatAssistantMessage_default as U, ɵmapMemoryMetadataEvent as Ua, enforceEvents as Ui, JsonPatchOperationSchema as Un, SubagentFinishedSuspendedOutcomeSchema as Ur, ActivityMessageSchema as Ut, CopilotChatUserMessage_default as V, ɵisRetryableMemoryStatus as Va, emitInspectorViewThreadResult$1 as Vi, IntelligenceAgent as Vn, SubagentFinishedOutcomeSchema as Vr, AbstractAgent$1 as Vt, CopilotChatToolCallsView as W, ɵmemoryAdapterEvents as Wa, enforceOutgoingInput as Wi, JsonPatchSchema as Wn, SubagentInfoSchema as Wr, ActivitySnapshotEventSchema as Wt, useMemories as X, ɵobservePhoenixSocketHealth$ as Xa, getMarkdownOperationSurfaceId$1 as Xi, MetadataSchema as Xn, TextInputContentSchema as Xr, AttributableSchema as Xt, useLearnFromUserAction as Y, ɵobservePhoenixJoinOutcome$ as Ya, flattenInformationalCards$1 as Yi, MessagesSnapshotEventSchema as Yn, TestOperationSchema as Yr, AssistantMessageSchema as Yt, useThreads$1 as Z, ɵobservePhoenixSocketSignals$ as Za, getRunOutcome as Zi, Middleware as Zn, TextMessageChunkEventSchema as Zr, AudioInputContentSchema as Zt, WildcardToolCallRender as _, randomUUID$2 as _a, VideoInputContentSchema as _i, DeveloperMessageSchema as _n, ReasoningMessageStartEventSchema as _r, useLicenseContext$1 as _t, ThreadsProvider as a, ofType as aa, ToolCallChunkEventSchema as ai, CompatibilityBoundary as an, ɵselectMemoriesAvailable$1 as ao, PROTOCOL_VERSION as ar, useAgent as at, CopilotSidebar as b, runHttpRequest as ba, WebMCPRegistry as bi, DocumentPartSchema as bn, ReplaceOperationSchema as br, GenerateSandboxedUiArgsSchema as bt, CoAgentStateRendersProvider as c, onInspectorActiveThread as ca, ToolCallSchema as ci, ContextStore as cn, ɵselectMemoriesIsMutating as co, RawEventSchema as cr, CopilotChatToolCallGroup as ct, shouldShowDevConsole as d, onInspectorViewThreadResult as da, ToolMessageSchema as di, CopilotKitCoreRuntimeConnectionStatus$1 as dn, ɵselectThreadsError$1 as do, ReasoningEncryptedValueSubtypeSchema as dr, useFrontendTools as dt, isInspectorThreadBridgeEnabled$1 as ea, TextMessageRoleSchema as ei, BackwardCompatibility_0_0_39 as en, ɵselectFetchMoreError$1 as eo, MultimodalCapabilitiesSchema as er, useConfigureSuggestions as et, useToast as f, parseProtoStream as fa, ToolSchema as fi, CopilotKitHeaderResolutionError as fn, ɵselectThreadsIsLoading$1 as fo, ReasoningEndEventSchema as fr, useFrontendTool as ft, useCopilotContext as g, props as ga, UserMessageSchema as gi, DebugLogger as gn, ReasoningMessageSchema as gr, useCopilotKit$1 as gt, CopilotContext as h, prepareSurfaceOperations$1 as ha, UrlSourceSchema as hi, DataSourceSchema as hn, ReasoningMessageEndEventSchema as hr, CopilotKitProvider as ht, ThreadsContext as i, mergeMetadata as ia, ToolCallArgsEventSchema as ii, BaseMessageSchema as in, ɵselectMemories$1 as io, OutputCapabilitiesSchema as ir, UseAgentUpdate as it, messageGroup as j, ɵCOPILOTKIT_FEATURES as ja, createDebugLogger as ji, HumanInTheLoopCapabilitiesSchema as jn, RunStartedEventSchema as jr, CopilotKitInspector as jt, CopilotChatAttachmentQueue as k, verifyEvents as ka, convertToLegacyEvents as ki, FunctionMiddleware as kn, RunFinishedSuccessOutcomeSchema as kr, MCPAppsActivityType as kt, useCoAgentStateRenders as l, onInspectorStopViewing$1 as la, ToolCallStartEventSchema as li, CopilotKitCore$1 as ln, ɵselectMemoriesRealtimeStatus$1 as lo, ReasoningCapabilitiesSchema as lr, useRenderTool as lt, useCopilotMessagesContext as m, parseToolArguments as ma, TransportCapabilitiesSchema as mi, CustomEventSchema as mn, ɵwithHeaderDefaults$1 as mo, ReasoningMessageContentEventSchema as mr, useRenderCustomMessages as mt, defaultCopilotContextCategories as n, isRecognizedEvent as na, TextPartSchema as ni, BackwardCompatibility_0_0_57 as nn, ɵselectIsFetchingNextPage$1 as no, MultimodalOutputCapabilitiesSchema as nr, useAgentContext as nt, useThreads as o, omitOptionalNulls as oa, ToolCallEndEventSchema as oi, ContentPartSchema as on, ɵselectMemoriesError$1 as oo, PartSourceSchema as or, useHumanInTheLoop as ot, CopilotMessagesContext as p, parseSSEStream as pa, ToolsCapabilitiesSchema as pi, CopyOperationSchema as pn, ɵthreadAdapterEvents as po, ReasoningMessageChunkEventSchema as pr, useRenderActivityMessage as pt, useAttachments as q, ɵmemoryRestEvents as qa, extractFenceOperations$1 as qi, MemoryError as qn, SuggestionEngine as qr, AgentRegistry as qt, CoAgentStateRenderBridge as r, isRunCompletionAware$1 as ra, TokenUsageSchema as ri, BaseEventSchema as rn, ɵselectIsMutating$1 as ro, OptionalMetadataSchema as rr, useCapabilities as rt, CoAgentStateRendersContext as s, on as sa, ToolCallResultEventSchema as si, ContextSchema as sn, ɵselectMemoriesIsLoading$1 as so, ProxiedCopilotRuntimeAgent$1 as sr, useDefaultRenderTool as st, CopilotKit as t, isInterruptExpired as ta, TextMessageStartEventSchema as ti, BackwardCompatibility_0_0_45 as tn, ɵselectHasNextPage$1 as to, MultimodalInputCapabilitiesSchema as tr, useSuggestions as tt, useAsyncCallback as u, onInspectorViewThread$1 as ua, ToolCallStatus$1 as ui, CopilotKitCoreErrorCode$1 as un, ɵselectThreads$1 as uo, ReasoningEncryptedValueEventSchema as ur, useComponent as ut, CopilotThreadsDrawer as v, resolveAgentDebugConfig as va, VideoInputPartSchema as vi, DocumentInputContentSchema as vn, ReasoningStartEventSchema as vr, CopilotKitCoreReact as vt, CopilotChatToggleButton as w, structuredClone_ as wa, classifySurfaceCards as wi, EventTypeSchema as wn, RunErrorEventSchema as wr, OpenGenerativeUIToolRenderer as wt, CopilotPopupView as x, segmentSurfaceProse$1 as xa, aggregateTokenUsage as xi, EventSchema as xn, ResumeEntrySchema as xr, OpenGenerativeUIActivityRenderer as xt, CopilotPopup as y, resolveDebugLogger as ya, VideoPartSchema as yi, DocumentInputPartSchema as yn, RemoveOperationSchema as yr, createA2UIMessageRenderer as yt, CopilotChatSuggestionPill as z, ɵisCopilotKitFeature as za, emitInspectorStopViewing as zi, InputContentSourceSchema as zn, SubagentErrorEventSchema as zr, AGUIError as zt };
15960
- //# sourceMappingURL=copilotkit-fKrKqoiP.mjs.map
16025
+ //# sourceMappingURL=copilotkit-DyxwF9wL.mjs.map