@copilotkit/react-core 2.0.0-rc.42 → 2.0.0-rc.44

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 (91) hide show
  1. package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts → MarkdownRendererContext-QFCldfW_.d.cts} +1 -1
  2. package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts.map → MarkdownRendererContext-QFCldfW_.d.cts.map} +1 -1
  3. package/dist/{MarkdownRendererContext-C2J_lgqF.d.cts → MarkdownRendererContext-aK63ZFd-.d.mts} +1 -1
  4. package/dist/{MarkdownRendererContext-C2J_lgqF.d.cts.map → MarkdownRendererContext-aK63ZFd-.d.mts.map} +1 -1
  5. package/dist/MarkdownSurfaces-Do948N1P.cjs +141 -0
  6. package/dist/MarkdownSurfaces-Do948N1P.cjs.map +1 -0
  7. package/dist/MarkdownSurfaces-rtE9wRUP.mjs +135 -0
  8. package/dist/MarkdownSurfaces-rtE9wRUP.mjs.map +1 -0
  9. package/dist/{MarkdownSurfaces-D2Ck-cbb.cjs → ProviderMarkdown-D0eI0aPo.cjs} +26 -136
  10. package/dist/ProviderMarkdown-D0eI0aPo.cjs.map +1 -0
  11. package/dist/{MarkdownSurfaces-Byz821bg.mjs → ProviderMarkdown-epL7F3Vt.mjs} +22 -132
  12. package/dist/ProviderMarkdown-epL7F3Vt.mjs.map +1 -0
  13. package/dist/accessibility-BLK-gE0R.mjs +129 -0
  14. package/dist/accessibility-BLK-gE0R.mjs.map +1 -0
  15. package/dist/accessibility-GnodqxkH.cjs +228 -0
  16. package/dist/accessibility-GnodqxkH.cjs.map +1 -0
  17. package/dist/{chat-Bf0vVdo7.mjs → chat-B1zczXUD.mjs} +21 -145
  18. package/dist/chat-B1zczXUD.mjs.map +1 -0
  19. package/dist/chat-BZ_bvAkg.d.mts +38 -0
  20. package/dist/chat-BZ_bvAkg.d.mts.map +1 -0
  21. package/dist/{chat-D3fxo6Ah.cjs → chat-CkFZMo5E.cjs} +29 -234
  22. package/dist/chat-CkFZMo5E.cjs.map +1 -0
  23. package/dist/chat-CpZVyF_t.d.cts +38 -0
  24. package/dist/chat-CpZVyF_t.d.cts.map +1 -0
  25. package/dist/context.cjs +2 -2
  26. package/dist/context.cjs.map +1 -1
  27. package/dist/context.d.cts +2 -2
  28. package/dist/context.d.mts +2 -2
  29. package/dist/context.mjs +2 -2
  30. package/dist/context.mjs.map +1 -1
  31. package/dist/generative-ui/map.cjs +26 -0
  32. package/dist/generative-ui/map.cjs.map +1 -0
  33. package/dist/generative-ui/map.d.cts +23 -0
  34. package/dist/generative-ui/map.d.cts.map +1 -0
  35. package/dist/generative-ui/map.d.mts +23 -0
  36. package/dist/generative-ui/map.d.mts.map +1 -0
  37. package/dist/generative-ui/map.mjs +24 -0
  38. package/dist/generative-ui/map.mjs.map +1 -0
  39. package/dist/generative-ui/native.cjs +9 -8
  40. package/dist/generative-ui/native.cjs.map +1 -1
  41. package/dist/generative-ui/native.d.cts +3 -2
  42. package/dist/generative-ui/native.d.cts.map +1 -1
  43. package/dist/generative-ui/native.d.mts +3 -2
  44. package/dist/generative-ui/native.d.mts.map +1 -1
  45. package/dist/generative-ui/native.mjs +4 -3
  46. package/dist/generative-ui/native.mjs.map +1 -1
  47. package/dist/generative-ui.cjs +11 -5767
  48. package/dist/generative-ui.cjs.map +1 -1
  49. package/dist/generative-ui.d.cts +5 -4
  50. package/dist/generative-ui.d.cts.map +1 -1
  51. package/dist/generative-ui.d.mts +6 -5
  52. package/dist/generative-ui.d.mts.map +1 -1
  53. package/dist/generative-ui.mjs +8 -5764
  54. package/dist/generative-ui.mjs.map +1 -1
  55. package/dist/{hooks-BRYonCVu.d.mts → hooks-D2H3iL0N.d.mts} +3 -3
  56. package/dist/{hooks-BRYonCVu.d.mts.map → hooks-D2H3iL0N.d.mts.map} +1 -1
  57. package/dist/{hooks-2Ur8NQhj.d.cts → hooks-Dy8HeEdr.d.cts} +2 -2
  58. package/dist/{hooks-2Ur8NQhj.d.cts.map → hooks-Dy8HeEdr.d.cts.map} +1 -1
  59. package/dist/index.cjs +183 -700
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +11 -103
  62. package/dist/index.d.cts.map +1 -1
  63. package/dist/index.d.mts +11 -103
  64. package/dist/index.d.mts.map +1 -1
  65. package/dist/index.mjs +66 -425
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/index.umd.js +6157 -799
  68. package/dist/index.umd.js.map +1 -1
  69. package/dist/{refs-BIUfn1wb.cjs → refs-B5Dn59Pn.cjs} +2 -2
  70. package/dist/{refs-BIUfn1wb.cjs.map → refs-B5Dn59Pn.cjs.map} +1 -1
  71. package/dist/{refs-CMrRm3ta.mjs → refs-BW15wX_V.mjs} +1 -1
  72. package/dist/{refs-CMrRm3ta.mjs.map → refs-BW15wX_V.mjs.map} +1 -1
  73. package/dist/{chat-DgP2N7bD.d.mts → runtime-context-B7f4M85q.d.mts} +21 -39
  74. package/dist/runtime-context-B7f4M85q.d.mts.map +1 -0
  75. package/dist/{chat-DtHs4alO.d.cts → runtime-context-CIkZS0ap.d.cts} +21 -39
  76. package/dist/runtime-context-CIkZS0ap.d.cts.map +1 -0
  77. package/dist/standard-CSBR4FhM.mjs +5800 -0
  78. package/dist/standard-CSBR4FhM.mjs.map +1 -0
  79. package/dist/standard-DBjcBGyd.cjs +5796 -0
  80. package/dist/standard-DBjcBGyd.cjs.map +1 -0
  81. package/dist/{use-generative-ui-root-C12htqbK.cjs → use-generative-ui-root-CIp0ytE6.cjs} +3 -3
  82. package/dist/{use-generative-ui-root-C12htqbK.cjs.map → use-generative-ui-root-CIp0ytE6.cjs.map} +1 -1
  83. package/dist/{use-generative-ui-root-CVgsDy1f.mjs → use-generative-ui-root-oBqPa6uy.mjs} +3 -2
  84. package/dist/{use-generative-ui-root-CVgsDy1f.mjs.map → use-generative-ui-root-oBqPa6uy.mjs.map} +1 -1
  85. package/package.json +14 -10
  86. package/dist/MarkdownSurfaces-Byz821bg.mjs.map +0 -1
  87. package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +0 -1
  88. package/dist/chat-Bf0vVdo7.mjs.map +0 -1
  89. package/dist/chat-D3fxo6Ah.cjs.map +0 -1
  90. package/dist/chat-DgP2N7bD.d.mts.map +0 -1
  91. package/dist/chat-DtHs4alO.d.cts.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,29 +1,26 @@
1
1
  "use client";
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_chat = require('./chat-D3fxo6Ah.cjs');
5
- const require_MarkdownSurfaces = require('./MarkdownSurfaces-D2Ck-cbb.cjs');
6
- const require_use_generative_ui_root = require('./use-generative-ui-root-C12htqbK.cjs');
4
+ const require_accessibility = require('./accessibility-GnodqxkH.cjs');
5
+ const require_ProviderMarkdown = require('./ProviderMarkdown-D0eI0aPo.cjs');
6
+ const require_chat = require('./chat-CkFZMo5E.cjs');
7
+ const require_use_generative_ui_root = require('./use-generative-ui-root-CIp0ytE6.cjs');
8
+ const require_MarkdownSurfaces = require('./MarkdownSurfaces-Do948N1P.cjs');
7
9
  let _copilotkit_core = require("@copilotkit/core");
8
10
  let react = require("react");
9
- react = require_chat.__toESM(react);
11
+ react = require_accessibility.__toESM(react);
10
12
  let react_jsx_runtime = require("react/jsx-runtime");
11
13
  let _copilotkit_react_core_context = require("@copilotkit/react-core/context");
12
14
  let _radix_ui_react_tooltip = require("@radix-ui/react-tooltip");
13
- _radix_ui_react_tooltip = require_chat.__toESM(_radix_ui_react_tooltip);
15
+ _radix_ui_react_tooltip = require_accessibility.__toESM(_radix_ui_react_tooltip);
14
16
  let _radix_ui_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
15
- _radix_ui_react_dropdown_menu = require_chat.__toESM(_radix_ui_react_dropdown_menu);
17
+ _radix_ui_react_dropdown_menu = require_accessibility.__toESM(_radix_ui_react_dropdown_menu);
16
18
  let _copilotkit_shared = require("@copilotkit/shared");
17
19
  let _copilotkit_web_inspector_mount = require("@copilotkit/web-inspector/mount");
18
20
  let _copilotkit_mcp_apps_renderer_activity = require("@copilotkit/mcp-apps-renderer/activity");
19
- let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
20
- let _copilotkit_a2ui_renderer_engine_core = require("@copilotkit/a2ui-renderer/engine-core");
21
- let zod = require("zod");
22
- zod = require_chat.__toESM(zod);
23
- let _copilotkit_a2ui_renderer_catalog_schema = require("@copilotkit/a2ui-renderer/catalog-schema");
24
21
  let _copilotkit_core_styles = require("@copilotkit/core/styles");
25
22
  let _radix_ui_react_popover = require("@radix-ui/react-popover");
26
- _radix_ui_react_popover = require_chat.__toESM(_radix_ui_react_popover);
23
+ _radix_ui_react_popover = require_accessibility.__toESM(_radix_ui_react_popover);
27
24
  let react_dom = require("react-dom");
28
25
  let _tanstack_react_virtual = require("@tanstack/react-virtual");
29
26
  let use_stick_to_bottom = require("use-stick-to-bottom");
@@ -31,22 +28,6 @@ let _copilotkit_web_components_threads_drawer = require("@copilotkit/web-compone
31
28
  let _ag_ui_core_schemas = require("@ag-ui/core/schemas");
32
29
  let _ag_ui_client = require("@ag-ui/client");
33
30
 
34
- //#region src/lib/use-latest-ref.ts
35
- const useIsomorphicLayoutEffect = typeof window === "undefined" ? react.useEffect : react.useLayoutEffect;
36
- /**
37
- * A ref that holds the latest `value`, for callbacks that run after render
38
- * (event handlers, controller callbacks). The ref changes in a layout effect,
39
- * not during render, so a render that React throws away leaves it alone.
40
- */
41
- function useLatestRef(value) {
42
- const ref = (0, react.useRef)(value);
43
- useIsomorphicLayoutEffect(() => {
44
- ref.current = value;
45
- });
46
- return ref;
47
- }
48
-
49
- //#endregion
50
31
  //#region src/components/ui/button.tsx
51
32
  const variantClasses = {
52
33
  default: "cpk-button-default",
@@ -180,7 +161,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
180
161
  "data-inset": inset,
181
162
  className: (0, _copilotkit_core.ɵcn)("cpk-dropdown-menu-sub-trigger", className),
182
163
  ...props,
183
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
164
+ children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
184
165
  name: "ChevronRight",
185
166
  className: "cpk-dropdown-menu-sub-trigger-icon"
186
167
  })]
@@ -258,7 +239,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
258
239
  const layout = (0, react.useSyncExternalStore)(autosize.subscribe, autosize.getSnapshot, autosize.getSnapshot);
259
240
  const isExpanded = mode === "input" && layout === "expanded";
260
241
  const previousModalStateRef = (0, react.useRef)(void 0);
261
- const onChangeRef = useLatestRef(onChange);
242
+ const onChangeRef = require_ProviderMarkdown.useLatestRef(onChange);
262
243
  const [composer] = (0, react.useState)(() => new _copilotkit_core.ɵComposerController({
263
244
  initialValue: value ?? "",
264
245
  onChange: (next) => onChangeRef.current?.(next)
@@ -331,7 +312,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
331
312
  if (!onSubmitMessage) return;
332
313
  if (composer.submit(onSubmitMessage, { value: resolvedValue })) inputRef.current?.focus();
333
314
  };
334
- const BoundTextArea = require_MarkdownSurfaces.renderSlot(textArea, CopilotChatInput.TextArea, {
315
+ const BoundTextArea = require_ProviderMarkdown.renderSlot(textArea, CopilotChatInput.TextArea, {
335
316
  ref: inputRef,
336
317
  value: resolvedValue,
337
318
  onChange: handleChange,
@@ -346,19 +327,19 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
346
327
  }
347
328
  send();
348
329
  };
349
- const BoundAudioRecorder = require_MarkdownSurfaces.renderSlot(audioRecorder, CopilotChatAudioRecorder, { ref: audioRecorderRef });
330
+ const BoundAudioRecorder = require_ProviderMarkdown.renderSlot(audioRecorder, CopilotChatAudioRecorder, { ref: audioRecorderRef });
350
331
  const showsStop = buttonAction === "stop";
351
- const BoundSendButton = require_MarkdownSurfaces.renderSlot(sendButton, CopilotChatInput.SendButton, {
332
+ const BoundSendButton = require_ProviderMarkdown.renderSlot(sendButton, CopilotChatInput.SendButton, {
352
333
  onClick: handleSendButtonClick,
353
334
  disabled: buttonDisabled,
354
335
  "aria-label": showsStop ? labels.chatInputToolbarStopButtonLabel : labels.chatInputToolbarSendButtonLabel,
355
- children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
336
+ children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
356
337
  name: "Square",
357
338
  className: "cpk-chat-input-stop-icon"
358
339
  }) : void 0
359
340
  });
360
- const BoundStartTranscribeButton = require_MarkdownSurfaces.renderSlot(startTranscribeButton, CopilotChatInput.StartTranscribeButton, { onClick: onStartTranscribe });
361
- const BoundCancelTranscribeButton = require_MarkdownSurfaces.renderSlot(cancelTranscribeButton, CopilotChatInput.CancelTranscribeButton, { onClick: onCancelTranscribe });
341
+ const BoundStartTranscribeButton = require_ProviderMarkdown.renderSlot(startTranscribeButton, CopilotChatInput.StartTranscribeButton, { onClick: onStartTranscribe });
342
+ const BoundCancelTranscribeButton = require_ProviderMarkdown.renderSlot(cancelTranscribeButton, CopilotChatInput.CancelTranscribeButton, { onClick: onCancelTranscribe });
362
343
  const handleFinishTranscribe = (0, react.useCallback)(async () => {
363
344
  const recorder = audioRecorderRef.current;
364
345
  if (recorder && recorder.state === "recording") try {
@@ -369,13 +350,13 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
369
350
  }
370
351
  onFinishTranscribe?.();
371
352
  }, [onFinishTranscribe, onFinishTranscribeWithAudio]);
372
- const BoundFinishTranscribeButton = require_MarkdownSurfaces.renderSlot(finishTranscribeButton, CopilotChatInput.FinishTranscribeButton, { onClick: handleFinishTranscribe });
373
- const BoundAddMenuButton = require_MarkdownSurfaces.renderSlot(addMenuButton, CopilotChatInput.AddMenuButton, {
353
+ const BoundFinishTranscribeButton = require_ProviderMarkdown.renderSlot(finishTranscribeButton, CopilotChatInput.FinishTranscribeButton, { onClick: handleFinishTranscribe });
354
+ const BoundAddMenuButton = require_ProviderMarkdown.renderSlot(addMenuButton, CopilotChatInput.AddMenuButton, {
374
355
  disabled: mode === "transcribe",
375
356
  onAddFile,
376
357
  toolsMenu
377
358
  });
378
- const BoundDisclaimer = require_MarkdownSurfaces.renderSlot(disclaimer, CopilotChatInput.Disclaimer, {});
359
+ const BoundDisclaimer = require_ProviderMarkdown.renderSlot(disclaimer, CopilotChatInput.Disclaimer, {});
379
360
  const shouldShowDisclaimer = (0, _copilotkit_core.ɵshowsComposerDisclaimer)({
380
361
  showDisclaimer,
381
362
  positioning
@@ -444,7 +425,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
444
425
  className: "cpk-chat-input-field",
445
426
  children: mode === "transcribe" ? BoundAudioRecorder : mode === "processing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
446
427
  className: "cpk-chat-input-processing",
447
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
428
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
448
429
  name: "Loader2",
449
430
  className: "cpk-chat-input-processing-spinner"
450
431
  })
@@ -518,7 +499,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
518
499
  className: (0, _copilotkit_core.ɵcn)("cpk-chat-input-send-button", className),
519
500
  "aria-label": labels.chatInputToolbarSendButtonLabel,
520
501
  ...props,
521
- children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
502
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
522
503
  name: "ArrowUp",
523
504
  className: "cpk-chat-input-send-icon"
524
505
  })
@@ -545,7 +526,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
545
526
  };
546
527
  _CopilotChatInput.StartTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
547
528
  "data-testid": "copilot-start-transcribe-button",
548
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
529
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
549
530
  name: "Mic",
550
531
  className: "cpk-chat-input-toolbar-icon"
551
532
  }),
@@ -555,7 +536,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
555
536
  });
556
537
  _CopilotChatInput.CancelTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
557
538
  "data-testid": "copilot-cancel-transcribe-button",
558
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
539
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
559
540
  name: "X",
560
541
  className: "cpk-chat-input-toolbar-icon"
561
542
  }),
@@ -565,7 +546,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
565
546
  });
566
547
  _CopilotChatInput.FinishTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
567
548
  "data-testid": "copilot-finish-transcribe-button",
568
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
549
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
569
550
  name: "Check",
570
551
  className: "cpk-chat-input-toolbar-icon"
571
552
  }),
@@ -604,7 +585,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
604
585
  disabled: isDisabled,
605
586
  "aria-label": labels.chatInputToolbarAddButtonLabel,
606
587
  ...props,
607
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
588
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
608
589
  name: "Plus",
609
590
  className: "cpk-chat-input-add-menu-icon"
610
591
  })
@@ -824,7 +805,7 @@ function ɵuseOwnedCore(ref, create) {
824
805
 
825
806
  //#endregion
826
807
  //#region package.json
827
- var version$1 = "2.0.0-rc.42";
808
+ var version$1 = "2.0.0-rc.44";
828
809
 
829
810
  //#endregion
830
811
  //#region src/components/CopilotKitInspector.tsx
@@ -1113,364 +1094,64 @@ const OpenGenerativeUIToolRenderer = function OpenGenerativeUIToolRenderer(props
1113
1094
  };
1114
1095
 
1115
1096
  //#endregion
1116
- //#region src/a2ui/A2UIRecoveryStates.tsx
1117
- /**
1118
- * Draws the lifecycle state of an `a2ui-surface` activity: the failure card,
1119
- * the host's loading component while building, or the skeleton.
1120
- */
1121
- function A2UILifecycleState({ snapshot, loadingComponent: LoadingComponent }) {
1122
- const { lifecycle } = snapshot;
1123
- const details = snapshot.showDebugDetails ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIDebugDetails, {
1124
- label: snapshot.debugDetailsLabel,
1125
- open: snapshot.debugDetailsOpen,
1126
- payload: snapshot.debugPayload
1127
- }) : null;
1128
- if (lifecycle.status === "failed") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1129
- className: "cpk-a2ui-recovery-failure",
1130
- children: [
1131
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1132
- className: "cpk-a2ui-recovery-failure-title",
1133
- children: _copilotkit_core.ɵA2UI_LIFECYCLE_TEXT.failureTitle
1134
- }),
1135
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1136
- className: "cpk-a2ui-recovery-failure-description",
1137
- children: _copilotkit_core.ɵA2UI_LIFECYCLE_TEXT.failureDescription
1138
- }),
1139
- details
1140
- ]
1141
- });
1142
- if (lifecycle.status === "building" && LoadingComponent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingComponent, {});
1143
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIGeneratingSkeleton, {
1144
- label: snapshot.label,
1145
- tokens: lifecycle.progressTokens,
1146
- phase: snapshot.progressPhase,
1147
- children: details
1148
- });
1149
- }
1097
+ //#region src/generative-ui/use-standard-ui-fallback.ts
1150
1098
  /**
1151
- * Animated wireframe skeleton with a label, an optional live token count, and
1152
- * an optional debug-detail slot below it. `phase` reveals the rows.
1099
+ * The standard UI, loaded once on first use. It is a dynamic import so the
1100
+ * standard components (chart, map, media, ...) stay out of the main entry:
1101
+ * an app that does not use generative UI never downloads them.
1153
1102
  */
1154
- function A2UIGeneratingSkeleton({ label, tokens, phase, children }) {
1155
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1156
- style: {
1157
- margin: "12px 0",
1158
- maxWidth: 320
1159
- },
1160
- children: [
1161
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1162
- style: {
1163
- position: "relative",
1164
- overflow: "hidden",
1165
- borderRadius: 12,
1166
- border: "1px solid rgba(228,228,231,0.8)",
1167
- backgroundColor: "#fff",
1168
- boxShadow: "0 1px 2px rgba(0,0,0,0.04)",
1169
- padding: "16px 18px 14px"
1170
- },
1171
- children: [
1172
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1173
- style: {
1174
- display: "flex",
1175
- alignItems: "center",
1176
- gap: 8,
1177
- marginBottom: 12
1178
- },
1179
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1180
- style: {
1181
- display: "flex",
1182
- gap: 4
1183
- },
1184
- children: [
1185
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dot, {}),
1186
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dot, {}),
1187
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dot, {})
1188
- ]
1189
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
1190
- width: 64,
1191
- height: 6,
1192
- borderRadius: 9999,
1193
- backgroundColor: "#e4e4e7",
1194
- opacity: phase >= 1 ? 1 : .4,
1195
- transition: "opacity 0.5s"
1196
- } })]
1197
- }),
1198
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1199
- style: {
1200
- display: "grid",
1201
- gap: 7
1202
- },
1203
- children: _copilotkit_core.ɵA2UI_SKELETON_ROWS.map((row, rowIndex) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1204
- style: {
1205
- display: "flex",
1206
- alignItems: "center",
1207
- gap: 6,
1208
- opacity: phase >= row.phase ? 1 : 0,
1209
- transition: `opacity 0.4s ${String(row.delay)}s`
1210
- },
1211
- children: row.parts.map((part, partIndex) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkeletonPart, { part }, partIndex))
1212
- }, rowIndex))
1213
- }),
1214
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
1215
- pointerEvents: "none",
1216
- position: "absolute",
1217
- inset: 0,
1218
- background: "linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255,255,255,0.6) 50%, transparent 60%, transparent 100%)",
1219
- backgroundSize: "250% 100%",
1220
- animation: "cpk-a2ui-sweep 3s ease-in-out infinite"
1221
- } })
1222
- ]
1223
- }),
1224
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1225
- style: {
1226
- display: "flex",
1227
- alignItems: "center",
1228
- justifyContent: "center",
1229
- gap: 8,
1230
- marginTop: 8
1231
- },
1232
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1233
- style: {
1234
- fontSize: 12,
1235
- color: "#a1a1aa",
1236
- letterSpacing: "0.025em"
1237
- },
1238
- children: label
1239
- }), typeof tokens === "number" && tokens > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1240
- style: {
1241
- fontSize: 11,
1242
- color: "#d4d4d8",
1243
- fontVariantNumeric: "tabular-nums"
1244
- },
1245
- children: [
1246
- "~",
1247
- tokens.toLocaleString(),
1248
- " tokens"
1249
- ]
1250
- })]
1251
- }),
1252
- children,
1253
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: `
1254
- @keyframes cpk-a2ui-fade {
1255
- 0%, 100% { opacity: 1; }
1256
- 50% { opacity: 0.5; }
1257
- }
1258
- @keyframes cpk-a2ui-sweep {
1259
- 0% { background-position: 250% 0; }
1260
- 100% { background-position: -250% 0; }
1261
- }
1262
- ` })
1263
- ]
1264
- });
1265
- }
1266
- function A2UIDebugDetails({ label, open, payload }) {
1267
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
1268
- open,
1269
- className: "cpk-a2ui-debug-details",
1270
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
1271
- className: "cpk-a2ui-debug-details-summary",
1272
- children: label
1273
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
1274
- className: "cpk-a2ui-debug-details-payload",
1275
- style: { fontSize: 11 },
1276
- children: payload
1277
- })]
1278
- });
1279
- }
1280
- function Dot() {
1281
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
1282
- width: 7,
1283
- height: 7,
1284
- borderRadius: "50%",
1285
- backgroundColor: "#d4d4d8",
1286
- flexShrink: 0
1287
- } });
1288
- }
1289
- function SkeletonPart({ part }) {
1290
- if (part === "dot") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dot, {});
1291
- if (part === "spacer") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: { width: 12 } });
1292
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
1293
- width: part.w,
1294
- height: 7,
1295
- borderRadius: 9999,
1296
- backgroundColor: part.bg,
1297
- animation: `cpk-a2ui-fade 2.4s ease-in-out ${String(part.anim)}s infinite`
1298
- } });
1299
- }
1300
-
1301
- //#endregion
1302
- //#region src/a2ui/A2UIMessageRenderer.tsx
1303
- let initialized = false;
1304
- function ensureInitialized() {
1305
- if (!initialized) {
1306
- (0, _copilotkit_a2ui_renderer.initializeDefaultCatalog)();
1307
- (0, _copilotkit_a2ui_renderer.injectStyles)();
1308
- initialized = true;
1103
+ let standardUIPromise;
1104
+ function loadStandardUI() {
1105
+ if (!standardUIPromise) {
1106
+ standardUIPromise = Promise.resolve().then(() => require("./standard-DBjcBGyd.cjs")).then((n) => n.standard_exports).then((module) => module.standardUI);
1107
+ standardUIPromise.catch(() => {
1108
+ standardUIPromise = void 0;
1109
+ });
1309
1110
  }
1310
- }
1311
- const warnInDevelopment = process.env.NODE_ENV !== "production" ? (message) => console.warn(message) : void 0;
1312
- /**
1313
- * The `a2ui-surface` activity carries the WHOLE generative-UI lifecycle on one
1314
- * stable messageId (OSS-162): pre-paint `status` ("building" | "retrying" |
1315
- * "failed") with recovery detail, then `a2ui_operations` on paint. Core's
1316
- * `ɵA2UIActivityController` decides what shows; this renderer draws it and
1317
- * keeps the surface mounted across the loader → surface hand-off.
1318
- */
1319
- function createA2UIMessageRenderer(options) {
1320
- const { theme, catalog, loadingComponent, recovery, onAction } = options;
1321
- return {
1322
- activityType: _copilotkit_core.ɵA2UI_SURFACE_ACTIVITY_TYPE,
1323
- content: _copilotkit_core.ɵA2UI_SURFACE_CONTENT_SCHEMA,
1324
- render: ({ content, agent }) => {
1325
- ensureInitialized();
1326
- const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
1327
- const [controller] = (0, react.useState)(() => {
1328
- const created = new _copilotkit_core.ɵA2UIActivityController({
1329
- recovery,
1330
- warn: warnInDevelopment
1331
- });
1332
- created.setContent(content);
1333
- return created;
1334
- });
1335
- const snapshot = (0, react.useSyncExternalStore)(controller.subscribe, controller.getSnapshot, controller.getSnapshot);
1336
- (0, react.useEffect)(() => {
1337
- controller.setContent(content);
1338
- }, [controller, content]);
1339
- (0, react.useEffect)(() => () => controller.dispose(), [controller]);
1340
- const markRendered = (0, react.useCallback)(() => controller.markRendered(), [controller]);
1341
- const groups = (0, react.useMemo)(() => (0, _copilotkit_core.ɵgroupA2UIOperationsBySurface)(snapshot.operations), [snapshot.operations]);
1342
- if (snapshot.view === "lifecycle") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UILifecycleState, {
1343
- snapshot,
1344
- loadingComponent
1345
- });
1346
- const surfaces = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1347
- className: "cpk-a2ui-message-surfaces",
1348
- children: Array.from(groups.entries()).map(([surfaceId, operations]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReactSurfaceHost, {
1349
- surfaceId,
1350
- operations,
1351
- theme,
1352
- agent,
1353
- copilotkit,
1354
- catalog,
1355
- onAction,
1356
- onRendered: markRendered
1357
- }, surfaceId))
1358
- });
1359
- const handingOff = snapshot.view === "handoff";
1360
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1361
- style: { position: "relative" },
1362
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1363
- "aria-hidden": handingOff,
1364
- style: handingOff ? {
1365
- position: "absolute",
1366
- inset: 0,
1367
- opacity: 0,
1368
- pointerEvents: "none"
1369
- } : void 0,
1370
- children: surfaces
1371
- }), handingOff && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UILifecycleState, {
1372
- snapshot,
1373
- loadingComponent
1374
- })]
1375
- });
1376
- }
1377
- };
1111
+ return standardUIPromise;
1378
1112
  }
1379
1113
  /**
1380
- * Renders a single A2UI surface using the React renderer.
1381
- * Wraps A2UIProvider + A2UIRenderer and bridges actions back to CopilotKit.
1114
+ * The generative UI config of the provider. That is the `generativeUI` prop
1115
+ * when it has a `ui`. Otherwise, when the runtime turns generative UI on, it
1116
+ * is the standard UI for the agents of the runtime, once the standard UI has
1117
+ * loaded, with the other options of the prop (such as `map` or `theme`).
1118
+ * `undefined` while generative UI is off, or still loading.
1382
1119
  */
1383
- function ReactSurfaceHost({ surfaceId, operations, theme, agent, copilotkit, catalog, onAction, onRendered }) {
1384
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1385
- className: "cpk-a2ui-message-surface-host",
1386
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_copilotkit_a2ui_renderer.A2UIProvider, {
1387
- onAction: (0, react.useCallback)(({ userAction }) => (0, _copilotkit_core.ɵrunA2UIAction)({
1388
- message: (0, _copilotkit_core.ɵtoA2UIClientEvent)(userAction ?? {}),
1389
- agent,
1390
- core: copilotkit,
1391
- onAction
1392
- }), [
1393
- agent,
1394
- copilotkit,
1395
- onAction
1396
- ]),
1397
- theme,
1398
- catalog,
1399
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SurfaceMessageProcessor, {
1400
- operations,
1401
- onRendered
1402
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UISurfaceOrError, { surfaceId })]
1403
- })
1404
- });
1405
- }
1406
- /**
1407
- * Renders the A2UI surface, with an error message above it if processing
1408
- * failed. A rejected snapshot leaves the surface as it was, so the card the
1409
- * user already sees stays visible next to the error.
1410
- * Must be a child of A2UIProvider to access the error state.
1411
- */
1412
- function A2UISurfaceOrError({ surfaceId }) {
1413
- const error = (0, _copilotkit_a2ui_renderer.useA2UIError)();
1414
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1415
- role: "alert",
1416
- className: "cpk-a2ui-message-error",
1417
- children: ["A2UI render error: ", error]
1418
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_a2ui_renderer.A2UIRenderer, {
1419
- surfaceId,
1420
- className: "cpk-a2ui-message-surface"
1421
- })] });
1422
- }
1423
- /**
1424
- * Applies the surface's operations to the provider's processor, reports each
1425
- * applied batch to the activity controller, and runs the development
1426
- * diagnostics. Must be a child of A2UIProvider.
1427
- */
1428
- function SurfaceMessageProcessor({ operations, onRendered }) {
1429
- const { applyOperations, getSurface } = (0, _copilotkit_a2ui_renderer.useA2UIActions)();
1430
- const [diagnostics] = (0, react.useState)(() => warnInDevelopment ? new _copilotkit_a2ui_renderer_engine_core.A2UISurfaceDiagnostics({ warn: warnInDevelopment }) : null);
1431
- (0, react.useEffect)(() => () => diagnostics?.dispose(), [diagnostics]);
1120
+ function useStandardUIFallback(generativeUI, runtimeInfo) {
1121
+ const fallback = (0, _copilotkit_core.ɵresolveGenerativeUIDefault)({
1122
+ runtimeEnabled: runtimeInfo?.generativeUIEnabled ?? false,
1123
+ runtimeAgents: runtimeInfo?.generativeUIAgents,
1124
+ hasUI: !!generativeUI?.ui
1125
+ });
1126
+ const active = fallback.active;
1127
+ const agentIds = fallback.active ? fallback.agentIds : void 0;
1128
+ const [standardUI, setStandardUI] = (0, react.useState)();
1432
1129
  (0, react.useEffect)(() => {
1433
- applyOperations(operations);
1434
- onRendered();
1435
- diagnostics?.check(operations, { getSurface });
1130
+ if (!active || standardUI) return;
1131
+ let cancelled = false;
1132
+ loadStandardUI().then((ui) => {
1133
+ if (!cancelled) setStandardUI(ui);
1134
+ }, (error) => {
1135
+ console.error("[generativeUI] could not load the standard UI for the runtime's generative UI:", error);
1136
+ });
1137
+ return () => {
1138
+ cancelled = true;
1139
+ };
1140
+ }, [active, standardUI]);
1141
+ return (0, react.useMemo)(() => {
1142
+ if (generativeUI?.ui) return generativeUI;
1143
+ if (!active || !standardUI) return void 0;
1144
+ return {
1145
+ ...generativeUI,
1146
+ ui: standardUI,
1147
+ agentIds: generativeUI?.agentIds ?? agentIds
1148
+ };
1436
1149
  }, [
1437
- applyOperations,
1438
- getSurface,
1439
- operations,
1440
- onRendered,
1441
- diagnostics
1150
+ generativeUI,
1151
+ active,
1152
+ standardUI,
1153
+ agentIds
1442
1154
  ]);
1443
- return null;
1444
- }
1445
-
1446
- //#endregion
1447
- //#region src/a2ui/A2UIToolCallRenderer.tsx
1448
- /**
1449
- * Registers a no-op renderer for the `render_a2ui` tool call so its raw streamed
1450
- * args are never surfaced in the transcript.
1451
- *
1452
- * The generation skeleton / retry / failure UX is NO LONGER owned here (OSS-162):
1453
- * the A2UI middleware drives the whole lifecycle on the `a2ui-surface` activity
1454
- * (one stable messageId, building → retrying → failed → painted), rendered in
1455
- * place by `createA2UIMessageRenderer`. Owning a skeleton per tool call caused a
1456
- * duplicate skeleton on retries / multi-call generations and a skeleton that
1457
- * lingered after the surface painted — both fixed by retiring it here.
1458
- *
1459
- * It is a built-in renderer, so a `renderToolCalls` entry or a
1460
- * `useRenderTool({ name: "render_a2ui" })` hook replaces it, and it never
1461
- * removes the app's renderers. It is removed when A2UI turns off.
1462
- */
1463
- function A2UIBuiltInToolCallRenderer() {
1464
- const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
1465
- (0, react.useEffect)(() => {
1466
- const renderer = require_chat.defineToolCallRenderer({
1467
- name: _copilotkit_core.ɵRENDER_A2UI_TOOL_NAME,
1468
- args: zod.any(),
1469
- render: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {})
1470
- });
1471
- return copilotkit.ɵaddBuiltInRenderToolCall(renderer);
1472
- }, [copilotkit]);
1473
- return null;
1474
1155
  }
1475
1156
 
1476
1157
  //#endregion
@@ -1542,8 +1223,8 @@ var CopilotKitCoreReact = class extends _copilotkit_core.CopilotKitCore {
1542
1223
  this._renderers.removeHookToolCall(name, agentId);
1543
1224
  }
1544
1225
  /**
1545
- * @internal Add a renderer for a tool a built-in feature owns (A2UI,
1546
- * generative UI). Prop and hook renderers with the same name and agent win
1226
+ * @internal Add a renderer for a tool a built-in feature owns
1227
+ * (generative UI). Prop and hook renderers with the same name and agent win
1547
1228
  * over it, and `setRenderToolCalls` never removes it.
1548
1229
  *
1549
1230
  * @returns A function that removes the renderer.
@@ -1639,7 +1320,7 @@ function useStableArrayProp(prop, name) {
1639
1320
  return value;
1640
1321
  }
1641
1322
  /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
1642
- const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, a2ui, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
1323
+ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
1643
1324
  const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
1644
1325
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
1645
1326
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
@@ -1653,18 +1334,12 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1653
1334
  }, [enableInspector]);
1654
1335
  const [inspectorOpenRequest, setInspectorOpenRequest] = (0, react.useState)(null);
1655
1336
  const [runtimeInfo, setRuntimeInfo] = (0, react.useState)(null);
1656
- const runtimeA2UIEnabled = runtimeInfo?.a2uiEnabled ?? false;
1657
- const runtimeOpenGenUIEnabled = runtimeInfo?.openGenerativeUIEnabled ?? false;
1658
- const [catalogToggleVersion, setCatalogToggleVersion] = (0, react.useState)(0);
1659
1337
  const openGenUIActive = (0, _copilotkit_core.ɵisOpenGenerativeUIActive)({
1660
- runtimeEnabled: runtimeOpenGenUIEnabled,
1338
+ runtimeEnabled: runtimeInfo?.openGenerativeUIEnabled ?? false,
1661
1339
  configured: !!openGenerativeUI
1662
1340
  });
1663
- const a2uiActive = (0, _copilotkit_core.ɵresolveA2UIActivation)({
1664
- runtimeEnabled: runtimeA2UIEnabled,
1665
- hasCatalog: !!a2ui?.catalog
1666
- }).active;
1667
- const generativeUIActive = !!generativeUI?.ui;
1341
+ const generativeUIConfig = useStandardUIFallback(generativeUI, runtimeInfo);
1342
+ const generativeUIActive = !!generativeUIConfig?.ui;
1668
1343
  const runtimeLicenseStatus = runtimeInfo?.licenseStatus;
1669
1344
  const runtimeEntitlements = runtimeInfo?.runtimeEntitlements;
1670
1345
  const runtimeEntitlementRetryPending = runtimeInfo?.runtimeEntitlementRetryPending ?? false;
@@ -1685,23 +1360,9 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1685
1360
  const renderCustomMessagesList = useStableArrayProp(renderCustomMessages, "renderCustomMessages");
1686
1361
  const renderActivityMessagesList = useStableArrayProp(renderActivityMessages, "renderActivityMessages");
1687
1362
  const copilotkitRef = (0, react.useRef)(null);
1688
- const rawCatalog = a2ui?.catalog;
1689
- const filteredCatalog = (0, react.useMemo)(() => {
1690
- if (!rawCatalog) return rawCatalog;
1691
- if (!(rawCatalog instanceof _copilotkit_a2ui_renderer.Catalog)) return rawCatalog;
1692
- const core = copilotkitRef.current;
1693
- return (0, _copilotkit_a2ui_renderer.filterCatalog)(rawCatalog, (name) => core ? core.isCatalogComponentEnabled(name) : true);
1694
- }, [rawCatalog, catalogToggleVersion]);
1695
1363
  const mcpAppsAllowSameOrigin = mcpApps?.allowSameOriginFallback === true;
1696
1364
  const allActivityRenderers = (0, react.useMemo)(() => (0, _copilotkit_core.ɵassembleActivityRenderers)({
1697
1365
  app: renderActivityMessagesList,
1698
- a2ui: a2uiActive ? createA2UIMessageRenderer({
1699
- theme: a2ui?.theme ?? _copilotkit_a2ui_renderer.viewerTheme,
1700
- catalog: filteredCatalog,
1701
- loadingComponent: a2ui?.loadingComponent,
1702
- recovery: a2ui?.recovery,
1703
- onAction: a2ui?.onAction
1704
- }) : void 0,
1705
1366
  builtIns: [
1706
1367
  {
1707
1368
  activityType: _copilotkit_mcp_apps_renderer_activity.MCPAppsActivityType,
@@ -1718,11 +1379,8 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1718
1379
  ]
1719
1380
  }), [
1720
1381
  renderActivityMessagesList,
1721
- a2uiActive,
1722
1382
  openGenUIActive,
1723
1383
  generativeUIActive,
1724
- a2ui,
1725
- filteredCatalog,
1726
1384
  mcpAppsAllowSameOrigin
1727
1385
  ]);
1728
1386
  const resolvedConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵresolveProviderConfig)({
@@ -1732,8 +1390,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1732
1390
  useSingleEndpoint,
1733
1391
  agents__unsafe_dev_only: agents,
1734
1392
  selfManagedAgents,
1735
- properties,
1736
- a2uiCatalog: a2ui?.catalog
1393
+ properties
1737
1394
  }), [
1738
1395
  runtimeUrl,
1739
1396
  publicApiKey,
@@ -1741,8 +1398,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1741
1398
  useSingleEndpoint,
1742
1399
  agents,
1743
1400
  selfManagedAgents,
1744
- properties,
1745
- a2ui?.catalog
1401
+ properties
1746
1402
  ]);
1747
1403
  const resolvedPublicKey = resolvedConfig.publicKey;
1748
1404
  const loggedDiagnosticsRef = (0, react.useRef)(/* @__PURE__ */ new Set());
@@ -1812,22 +1468,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1812
1468
  onError,
1813
1469
  learning: learningConfig
1814
1470
  }));
1815
- const generativeUIRuntime = require_use_generative_ui_root.useGenerativeUIRoot(copilotkit, generativeUI);
1816
- const [a2uiCatalogController] = (0, react.useState)(() => new _copilotkit_a2ui_renderer_catalog_schema.A2UICatalogController(copilotkit, _copilotkit_a2ui_renderer.basicCatalog));
1817
- (0, react.useEffect)(() => a2uiCatalogController.subscribe(() => setCatalogToggleVersion((v) => v + 1)), [a2uiCatalogController]);
1818
- (0, react.useEffect)(() => {
1819
- a2uiCatalogController.update({
1820
- enabled: a2uiActive,
1821
- catalog: rawCatalog,
1822
- includeSchema: a2ui?.includeSchema
1823
- });
1824
- }, [
1825
- a2uiCatalogController,
1826
- a2uiActive,
1827
- rawCatalog,
1828
- a2ui?.includeSchema
1829
- ]);
1830
- (0, react.useEffect)(() => () => a2uiCatalogController.dispose(), [a2uiCatalogController]);
1471
+ const generativeUIRuntime = require_use_generative_ui_root.useGenerativeUIRoot(copilotkit, generativeUIConfig);
1831
1472
  (0, react.useEffect)(() => {
1832
1473
  const syncRuntimeInfo = () => setRuntimeInfo(copilotkit.ɵruntimeInfo);
1833
1474
  const unsubscribe = copilotkit.ɵsubscribeToRuntimeInfo(syncRuntimeInfo);
@@ -1949,15 +1590,14 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
1949
1590
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_copilotkit_react_core_context.LicenseContext.Provider, {
1950
1591
  value: licenseState.context,
1951
1592
  children: [
1952
- a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIBuiltInToolCallRenderer, {}),
1953
1593
  generativeUIActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_chat.GenerativeUIToolCallRenderer, {}),
1954
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.MarkdownRendererProvider, {
1594
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.MarkdownRendererProvider, {
1955
1595
  renderer: markdownRenderer,
1956
1596
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CopilotKitInspectorContextProvider, {
1957
1597
  value: inspectorContextValue,
1958
1598
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_react_core_context.CopilotKitAgentIdContext.Provider, {
1959
1599
  value: agentId,
1960
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_chat.GenerativeUIRuntimeContext.Provider, {
1600
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_accessibility.GenerativeUIRuntimeContext.Provider, {
1961
1601
  value: generativeUIRuntime,
1962
1602
  children
1963
1603
  })
@@ -2431,14 +2071,14 @@ function Collapsible({ open, id, className, children }) {
2431
2071
  });
2432
2072
  }
2433
2073
  function StatusIcon({ status, className }) {
2434
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
2074
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
2435
2075
  name: _copilotkit_core.ɵTOOL_CALL_STATUS_ICONS[status],
2436
2076
  "aria-hidden": "true",
2437
2077
  className: (0, _copilotkit_core.ɵcn)("cpk-tool-call-status-icon", status === "running" && "cpk-tool-call-status-icon-running", status === "failed" && "cpk-tool-call-status-icon-failed", className)
2438
2078
  });
2439
2079
  }
2440
2080
  function Chevron({ open, className }) {
2441
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
2081
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
2442
2082
  name: "ChevronRight",
2443
2083
  "aria-hidden": "true",
2444
2084
  className: (0, _copilotkit_core.ɵcn)("cpk-tool-call-chevron", open && "cpk-tool-call-chevron-open", className)
@@ -3641,7 +3281,7 @@ function CopilotChatToolCallsView({ message, messages = [], display: displayProp
3641
3281
  })
3642
3282
  }, segment.id);
3643
3283
  }
3644
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: require_MarkdownSurfaces.renderSlot(group, CopilotChatToolCallGroup, {
3284
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: require_ProviderMarkdown.renderSlot(group, CopilotChatToolCallGroup, {
3645
3285
  calls: segment.calls,
3646
3286
  renderCall,
3647
3287
  appearance: (0, _copilotkit_core.ɵtoolCallAppearance)(display) ?? "card",
@@ -3744,7 +3384,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
3744
3384
  event.currentTarget.click();
3745
3385
  }
3746
3386
  },
3747
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3387
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
3748
3388
  name: "Wrench",
3749
3389
  "aria-hidden": "true",
3750
3390
  className: "cpk-inspector-button-icon",
@@ -3810,7 +3450,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
3810
3450
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenuItem, {
3811
3451
  onSelect: hideShortcuts,
3812
3452
  className: "cpk-inspector-button-menu-item cpk-inspector-button-hide-item",
3813
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3453
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
3814
3454
  name: "EyeOff",
3815
3455
  "aria-hidden": "true",
3816
3456
  className: "cpk-inspector-button-menu-item-icon"
@@ -3939,7 +3579,7 @@ function useCopyFeedback() {
3939
3579
  //#region src/components/chat/CopilotChatAssistantMessage.tsx
3940
3580
  function resolveMarkdownRenderer(value) {
3941
3581
  if (!value) return CopilotChatAssistantMessage.MarkdownRenderer;
3942
- if (require_MarkdownSurfaces.isReactComponentType(value)) {
3582
+ if (require_ProviderMarkdown.isReactComponentType(value)) {
3943
3583
  const ProvidedRenderer = value;
3944
3584
  const ProvidedMarkdownRenderer = (props) => react.default.createElement(ProvidedRenderer, props);
3945
3585
  return ProvidedMarkdownRenderer;
@@ -3978,7 +3618,7 @@ function WorkText({ messageId, children }) {
3978
3618
  */
3979
3619
  function BoundInspectorButton({ inspectorButton, messageId, openInspector, ...props }) {
3980
3620
  const chatConfiguration = require_chat.useCopilotChatConfiguration();
3981
- return require_MarkdownSurfaces.renderSlot(inspectorButton, CopilotChatAssistantMessage.InspectorButton, {
3621
+ return require_ProviderMarkdown.renderSlot(inspectorButton, CopilotChatAssistantMessage.InspectorButton, {
3982
3622
  ...props,
3983
3623
  onClick: () => openInspector({
3984
3624
  messageId,
@@ -4028,7 +3668,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
4028
3668
  onPointerEnter: () => comment.enter("pointer"),
4029
3669
  onPointerLeave: () => comment.leave("pointer"),
4030
3670
  className: "cpk-assistant-message-feedback-popover",
4031
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: require_MarkdownSurfaces.renderSlot(feedbackComment, CopilotChatAssistantMessage.FeedbackComment, {
3671
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: require_ProviderMarkdown.renderSlot(feedbackComment, CopilotChatAssistantMessage.FeedbackComment, {
4032
3672
  value: comment.draft,
4033
3673
  savedComment,
4034
3674
  inputRef: comment.inputRef,
@@ -4041,7 +3681,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
4041
3681
  });
4042
3682
  }
4043
3683
  function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible = true, markdownRenderer, toolbar, copyButton, inspectorButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, feedbackComment: feedbackCommentSlot, toolCallsView, children, className, ...props }) {
4044
- const providerRenderer = require_chat.useShallowStableRef(require_MarkdownSurfaces.useMarkdownRenderer());
3684
+ const providerRenderer = require_accessibility.useShallowStableRef(require_ProviderMarkdown.useMarkdownRenderer());
4045
3685
  const DefaultMarkdownRenderer = (0, react.useMemo)(() => resolveMarkdownRenderer(providerRenderer), [providerRenderer]);
4046
3686
  const hasContent = (0, _copilotkit_core.ɵhasAssistantMessageText)(message.content);
4047
3687
  const isLatestAssistantMessage = message.role === "assistant" && (isLatest ?? messages?.[messages.length - 1]?.id === message.id);
@@ -4075,16 +3715,16 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4075
3715
  onKeyDown: handlers.keyDown
4076
3716
  };
4077
3717
  };
4078
- const boundMarkdownRenderer = require_MarkdownSurfaces.renderSlot(markdownRenderer, DefaultMarkdownRenderer, {
3718
+ const boundMarkdownRenderer = require_ProviderMarkdown.renderSlot(markdownRenderer, DefaultMarkdownRenderer, {
4079
3719
  content: message.content || "",
4080
3720
  isStreaming: !!(isRunning && isLatestAssistantMessage),
4081
3721
  messageId: message.id
4082
3722
  });
4083
- const boundCopyButton = require_MarkdownSurfaces.renderSlot(copyButton, CopilotChatAssistantMessage.CopyButton, { onClick: async () => {
3723
+ const boundCopyButton = require_ProviderMarkdown.renderSlot(copyButton, CopilotChatAssistantMessage.CopyButton, { onClick: async () => {
4084
3724
  if (message.content) return await (0, _copilotkit_shared.copyToClipboard)(message.content);
4085
3725
  return false;
4086
3726
  } });
4087
- const boundThumbsUpButton = require_MarkdownSurfaces.renderSlot(thumbsUpButton, CopilotChatAssistantMessage.ThumbsUpButton, {
3727
+ const boundThumbsUpButton = require_ProviderMarkdown.renderSlot(thumbsUpButton, CopilotChatAssistantMessage.ThumbsUpButton, {
4088
3728
  onClick: onThumbsUp || feedback ? (event) => {
4089
3729
  if (rate("up", event)) onThumbsUp?.(message);
4090
3730
  } : void 0,
@@ -4095,15 +3735,15 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4095
3735
  messageId: message.id,
4096
3736
  openInspector
4097
3737
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
4098
- const boundThumbsDownButton = require_MarkdownSurfaces.renderSlot(thumbsDownButton, CopilotChatAssistantMessage.ThumbsDownButton, {
3738
+ const boundThumbsDownButton = require_ProviderMarkdown.renderSlot(thumbsDownButton, CopilotChatAssistantMessage.ThumbsDownButton, {
4099
3739
  onClick: onThumbsDown || feedback ? (event) => {
4100
3740
  if (rate("down", event)) onThumbsDown?.(message);
4101
3741
  } : void 0,
4102
3742
  ...thumbFeedbackProps("down")
4103
3743
  });
4104
- const boundReadAloudButton = require_MarkdownSurfaces.renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
4105
- const boundRegenerateButton = require_MarkdownSurfaces.renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
4106
- const boundToolbar = require_MarkdownSurfaces.renderSlot(toolbar, CopilotChatAssistantMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3744
+ const boundReadAloudButton = require_ProviderMarkdown.renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
3745
+ const boundRegenerateButton = require_ProviderMarkdown.renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
3746
+ const boundToolbar = require_ProviderMarkdown.renderSlot(toolbar, CopilotChatAssistantMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4107
3747
  className: "cpk-assistant-message-toolbar-items",
4108
3748
  children: [
4109
3749
  boundCopyButton,
@@ -4115,7 +3755,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4115
3755
  showInspectorShortcut && boundInspectorButton
4116
3756
  ]
4117
3757
  }) });
4118
- const boundToolCallsView = require_MarkdownSurfaces.renderSlot(toolCallsView, CopilotChatToolCallsView, {
3758
+ const boundToolCallsView = require_ProviderMarkdown.renderSlot(toolCallsView, CopilotChatToolCallsView, {
4119
3759
  message,
4120
3760
  messages
4121
3761
  });
@@ -4192,14 +3832,14 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4192
3832
  }
4193
3833
  (function(_CopilotChatAssistantMessage) {
4194
3834
  _CopilotChatAssistantMessage.MarkdownRenderer = ({ content, isStreaming, className, messageId, ...config }) => {
4195
- if (require_chat.useGenerativeUIRuntime()?.transport === "markdown" && messageId !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.MarkdownSurfaces, {
3835
+ if (require_accessibility.useGenerativeUIRuntime()?.transport === "markdown" && messageId !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.MarkdownSurfaces, {
4196
3836
  content: content ?? "",
4197
3837
  messageId,
4198
3838
  isStreaming,
4199
3839
  className,
4200
3840
  ...config
4201
3841
  });
4202
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.StreamingMarkdownDefaultRenderer, {
3842
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.StreamingMarkdownDefaultRenderer, {
4203
3843
  content: content ?? "",
4204
3844
  isStreaming,
4205
3845
  className,
@@ -4249,10 +3889,10 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4249
3889
  },
4250
3890
  className,
4251
3891
  ...props,
4252
- children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3892
+ children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4253
3893
  name: "Check",
4254
3894
  className: "cpk-assistant-message-toolbar-icon"
4255
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3895
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4256
3896
  name: "Copy",
4257
3897
  className: "cpk-assistant-message-toolbar-icon"
4258
3898
  })
@@ -4265,7 +3905,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4265
3905
  "data-testid": "copilot-thumbs-up-button",
4266
3906
  title: title || labels.assistantMessageToolbarThumbsUpLabel,
4267
3907
  ...props,
4268
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3908
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4269
3909
  name: "ThumbsUp",
4270
3910
  className: "cpk-assistant-message-toolbar-icon",
4271
3911
  fill: props["aria-pressed"] === true ? "currentColor" : "none"
@@ -4278,7 +3918,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4278
3918
  "data-testid": "copilot-thumbs-down-button",
4279
3919
  title: title || labels.assistantMessageToolbarThumbsDownLabel,
4280
3920
  ...props,
4281
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3921
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4282
3922
  name: "ThumbsDown",
4283
3923
  className: "cpk-assistant-message-toolbar-icon",
4284
3924
  fill: props["aria-pressed"] === true ? "currentColor" : "none"
@@ -4316,7 +3956,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4316
3956
  variant: "assistantMessageToolbarButton",
4317
3957
  "aria-label": labels.assistantMessageFeedbackCommentSubmitLabel,
4318
3958
  title: labels.assistantMessageFeedbackCommentSubmitLabel,
4319
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3959
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4320
3960
  name: "ArrowUp",
4321
3961
  className: "cpk-assistant-message-feedback-comment-submit-icon"
4322
3962
  })
@@ -4329,7 +3969,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4329
3969
  "data-testid": "copilot-read-aloud-button",
4330
3970
  title: title || labels.assistantMessageToolbarReadAloudLabel,
4331
3971
  ...props,
4332
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3972
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4333
3973
  name: "Volume2",
4334
3974
  className: "cpk-assistant-message-read-aloud-icon"
4335
3975
  })
@@ -4341,7 +3981,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
4341
3981
  "data-testid": "copilot-regenerate-button",
4342
3982
  title: title || labels.assistantMessageToolbarRegenerateLabel,
4343
3983
  ...props,
4344
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
3984
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4345
3985
  name: "RefreshCw",
4346
3986
  className: "cpk-assistant-message-toolbar-icon"
4347
3987
  })
@@ -4398,7 +4038,7 @@ function Lightbox({ onClose, label, children }) {
4398
4038
  onClick: onClose,
4399
4039
  className: "cpk-attachment-lightbox-close-button",
4400
4040
  "aria-label": labels.attachmentPreviewCloseButtonLabel,
4401
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4041
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4402
4042
  name: "X",
4403
4043
  className: "cpk-attachment-lightbox-close-icon"
4404
4044
  })
@@ -4537,13 +4177,13 @@ const CopilotChatAttachmentRenderer = ({ type, source, filename, className }) =>
4537
4177
  function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfBranches, onSwitchToBranch, additionalToolbarItems, messageRenderer, toolbar, copyButton, editButton, branchNavigation, children, className, ...props }) {
4538
4178
  const flattenedContent = (0, react.useMemo)(() => (0, _copilotkit_core.ɵflattenUserMessageContent)(message.content), [message.content]);
4539
4179
  const mediaParts = (0, react.useMemo)(() => (0, _copilotkit_core.ɵgetUserMessageMediaParts)(message.content), [message.content]);
4540
- const BoundMessageRenderer = require_MarkdownSurfaces.renderSlot(messageRenderer, CopilotChatUserMessage.MessageRenderer, { content: flattenedContent });
4541
- const BoundCopyButton = require_MarkdownSurfaces.renderSlot(copyButton, CopilotChatUserMessage.CopyButton, { onClick: async () => {
4180
+ const BoundMessageRenderer = require_ProviderMarkdown.renderSlot(messageRenderer, CopilotChatUserMessage.MessageRenderer, { content: flattenedContent });
4181
+ const BoundCopyButton = require_ProviderMarkdown.renderSlot(copyButton, CopilotChatUserMessage.CopyButton, { onClick: async () => {
4542
4182
  if (flattenedContent) return await (0, _copilotkit_shared.copyToClipboard)(flattenedContent);
4543
4183
  return false;
4544
4184
  } });
4545
- const BoundEditButton = require_MarkdownSurfaces.renderSlot(editButton, CopilotChatUserMessage.EditButton, { onClick: () => onEditMessage?.({ message }) });
4546
- const BoundBranchNavigation = require_MarkdownSurfaces.renderSlot(branchNavigation, CopilotChatUserMessage.BranchNavigation, {
4185
+ const BoundEditButton = require_ProviderMarkdown.renderSlot(editButton, CopilotChatUserMessage.EditButton, { onClick: () => onEditMessage?.({ message }) });
4186
+ const BoundBranchNavigation = require_ProviderMarkdown.renderSlot(branchNavigation, CopilotChatUserMessage.BranchNavigation, {
4547
4187
  currentBranch: branchIndex,
4548
4188
  numberOfBranches,
4549
4189
  onSwitchToBranch,
@@ -4554,7 +4194,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
4554
4194
  numberOfBranches: numberOfBranches ?? 1,
4555
4195
  canSwitch: onSwitchToBranch !== void 0
4556
4196
  });
4557
- const BoundToolbar = require_MarkdownSurfaces.renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4197
+ const BoundToolbar = require_ProviderMarkdown.renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4558
4198
  className: "cpk-user-message-toolbar-items",
4559
4199
  children: [
4560
4200
  additionalToolbarItems,
@@ -4644,10 +4284,10 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
4644
4284
  },
4645
4285
  className,
4646
4286
  ...props,
4647
- children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4287
+ children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4648
4288
  name: "Check",
4649
4289
  className: "cpk-user-message-toolbar-icon"
4650
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4290
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4651
4291
  name: "Copy",
4652
4292
  className: "cpk-user-message-toolbar-icon"
4653
4293
  })
@@ -4660,7 +4300,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
4660
4300
  title: title || labels.userMessageToolbarEditMessageLabel,
4661
4301
  className,
4662
4302
  ...props,
4663
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4303
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4664
4304
  name: "Edit",
4665
4305
  className: "cpk-user-message-toolbar-icon"
4666
4306
  })
@@ -4690,7 +4330,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
4690
4330
  disabled: !canGoPrev,
4691
4331
  className: "cpk-user-message-branch-button",
4692
4332
  "aria-label": labels.userMessageToolbarPreviousBranchLabel,
4693
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4333
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4694
4334
  name: "ChevronLeft",
4695
4335
  className: "cpk-user-message-branch-icon"
4696
4336
  })
@@ -4714,7 +4354,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
4714
4354
  disabled: !canGoNext,
4715
4355
  className: "cpk-user-message-branch-button",
4716
4356
  "aria-label": labels.userMessageToolbarNextBranchLabel,
4717
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4357
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4718
4358
  name: "ChevronRight",
4719
4359
  className: "cpk-user-message-branch-icon"
4720
4360
  })
@@ -4757,7 +4397,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
4757
4397
  isStreaming,
4758
4398
  elapsedSeconds: elapsed
4759
4399
  }, labels);
4760
- const boundHeader = require_MarkdownSurfaces.renderSlot(header, CopilotChatReasoningMessage.Header, {
4400
+ const boundHeader = require_ProviderMarkdown.renderSlot(header, CopilotChatReasoningMessage.Header, {
4761
4401
  isOpen,
4762
4402
  label,
4763
4403
  hasContent,
@@ -4765,12 +4405,12 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
4765
4405
  elapsedSeconds: elapsed,
4766
4406
  onClick: handleToggle
4767
4407
  });
4768
- const boundContent = require_MarkdownSurfaces.renderSlot(contentView, CopilotChatReasoningMessage.Content, {
4408
+ const boundContent = require_ProviderMarkdown.renderSlot(contentView, CopilotChatReasoningMessage.Content, {
4769
4409
  isStreaming,
4770
4410
  hasContent,
4771
4411
  children: message.content
4772
4412
  });
4773
- const boundToggle = require_MarkdownSurfaces.renderSlot(toggle, CopilotChatReasoningMessage.Toggle, {
4413
+ const boundToggle = require_ProviderMarkdown.renderSlot(toggle, CopilotChatReasoningMessage.Toggle, {
4774
4414
  isOpen,
4775
4415
  children: boundContent
4776
4416
  });
@@ -4811,7 +4451,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
4811
4451
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk-reasoning-message-indicator-dot" })
4812
4452
  }),
4813
4453
  headerChildren,
4814
- isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4454
+ isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4815
4455
  name: "ChevronRight",
4816
4456
  className: (0, _copilotkit_core.ɵcn)("cpk-reasoning-message-chevron", isOpen && "cpk-reasoning-message-chevron-open")
4817
4457
  })
@@ -4825,7 +4465,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
4825
4465
  ...contentProps,
4826
4466
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4827
4467
  className: "cpk-reasoning-message-text",
4828
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.StreamingMarkdownDefaultRenderer, {
4468
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.StreamingMarkdownDefaultRenderer, {
4829
4469
  content: typeof contentChildren === "string" ? contentChildren : "",
4830
4470
  isStreaming
4831
4471
  }), isStreaming && hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -4868,7 +4508,7 @@ const CopilotChatSuggestionPill = react.default.forwardRef(function CopilotChatS
4868
4508
  ...props,
4869
4509
  children: [isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4870
4510
  className: "cpk-suggestion-pill-icon",
4871
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4511
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
4872
4512
  name: "Loader2",
4873
4513
  className: "cpk-suggestion-pill-spinner",
4874
4514
  "aria-hidden": "true"
@@ -4900,14 +4540,14 @@ const CopilotChatSuggestionView = react.default.forwardRef(function CopilotChatS
4900
4540
  if (!loadingIndexes || loadingIndexes.length === 0) return /* @__PURE__ */ new Set();
4901
4541
  return new Set(loadingIndexes);
4902
4542
  }, [loadingIndexes]);
4903
- const ContainerElement = require_MarkdownSurfaces.renderSlot(container, DefaultContainer, {
4543
+ const ContainerElement = require_ProviderMarkdown.renderSlot(container, DefaultContainer, {
4904
4544
  ref,
4905
4545
  className,
4906
4546
  ...restProps
4907
4547
  });
4908
4548
  const suggestionElements = suggestions.map((suggestion, index) => {
4909
4549
  const isLoading = loadingSet.has(index) || suggestion.isLoading === true;
4910
- const pill = require_MarkdownSurfaces.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
4550
+ const pill = require_ProviderMarkdown.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
4911
4551
  children: suggestion.title,
4912
4552
  className: suggestion.className,
4913
4553
  isLoading,
@@ -4918,7 +4558,7 @@ const CopilotChatSuggestionView = react.default.forwardRef(function CopilotChatS
4918
4558
  });
4919
4559
  const boundContainer = react.default.cloneElement(ContainerElement, void 0, suggestionElements);
4920
4560
  if (typeof children === "function") {
4921
- const sampleSuggestion = require_MarkdownSurfaces.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
4561
+ const sampleSuggestion = require_ProviderMarkdown.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
4922
4562
  children: suggestions[0]?.title ?? "",
4923
4563
  isLoading: suggestions.length > 0 ? loadingSet.has(0) || suggestions[0]?.isLoading === true : false,
4924
4564
  type: "button"
@@ -5034,7 +4674,7 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
5034
4674
  className: "cpk-work-summary-failed",
5035
4675
  children: text.failed
5036
4676
  }),
5037
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
4677
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
5038
4678
  name: "ChevronRight",
5039
4679
  "aria-hidden": "true",
5040
4680
  className: (0, _copilotkit_core.ɵcn)("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
@@ -5323,7 +4963,7 @@ function IntelligenceIndicator(props) {
5323
4963
  if (phase === "hidden") return null;
5324
4964
  if (message.role !== "assistant") return null;
5325
4965
  if (!messageHasMatchingToolCall(message)) return null;
5326
- return require_MarkdownSurfaces.renderSlot(intelligenceIndicator, IntelligenceIndicatorView, {
4966
+ return require_ProviderMarkdown.renderSlot(intelligenceIndicator, IntelligenceIndicatorView, {
5327
4967
  message,
5328
4968
  status: phase === "finished" ? "finished" : "in-progress",
5329
4969
  label
@@ -5337,7 +4977,7 @@ function IntelligenceIndicator(props) {
5337
4977
  * slot forms: a component type, a className string, or a partial-props object.
5338
4978
  */
5339
4979
  function resolveSlotComponent(slot, DefaultComponent) {
5340
- if (require_MarkdownSurfaces.isReactComponentType(slot)) return {
4980
+ if (require_ProviderMarkdown.isReactComponentType(slot)) return {
5341
4981
  Component: slot,
5342
4982
  slotProps: void 0
5343
4983
  };
@@ -5540,7 +5180,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
5540
5180
  open: working || calls.length > 0,
5541
5181
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5542
5182
  className: "cpk-message-view-work-summary",
5543
- children: require_MarkdownSurfaces.renderSlot(workSummary, CopilotChatWorkSummary, {
5183
+ children: require_ProviderMarkdown.renderSlot(workSummary, CopilotChatWorkSummary, {
5544
5184
  isWorking: working,
5545
5185
  isOpen: open,
5546
5186
  calls,
@@ -6081,7 +5721,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
6081
5721
  pendingWorkSummary && renderWorkSummary(latestTurnKey, []),
6082
5722
  showCursor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6083
5723
  className: "cpk-message-view-cursor-container",
6084
- children: require_MarkdownSurfaces.renderSlot(cursor, CopilotChatMessageView.Cursor, {})
5724
+ children: require_ProviderMarkdown.renderSlot(cursor, CopilotChatMessageView.Cursor, {})
6085
5725
  })
6086
5726
  ]
6087
5727
  })
@@ -6204,7 +5844,7 @@ function VideoPreview({ attachment }) {
6204
5844
  "aria-label": labels.attachmentPlayVideoButtonLabel,
6205
5845
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6206
5846
  className: "cpk-attachment-queue-video-play-badge",
6207
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
5847
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
6208
5848
  name: "Play",
6209
5849
  className: "cpk-attachment-queue-video-play-icon"
6210
5850
  })
@@ -6400,7 +6040,7 @@ function DropOverlay() {
6400
6040
  className: "cpk-chat-view-drop-overlay",
6401
6041
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6402
6042
  className: "cpk-chat-view-drop-overlay-content",
6403
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
6043
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
6404
6044
  name: "Upload",
6405
6045
  className: "cpk-chat-view-drop-overlay-icon"
6406
6046
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -6438,12 +6078,12 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6438
6078
  setIsResizing(state.isResizing);
6439
6079
  });
6440
6080
  }, [inputContainerEl]);
6441
- const BoundMessageView = require_MarkdownSurfaces.renderSlot(messageView, CopilotChatMessageView, {
6081
+ const BoundMessageView = require_ProviderMarkdown.renderSlot(messageView, CopilotChatMessageView, {
6442
6082
  messages,
6443
6083
  isRunning,
6444
6084
  intelligenceIndicator
6445
6085
  });
6446
- const BoundInput = require_MarkdownSurfaces.renderSlot(input, CopilotChatInput_default, {
6086
+ const BoundInput = require_ProviderMarkdown.renderSlot(input, CopilotChatInput_default, {
6447
6087
  onSubmitMessage,
6448
6088
  onStop,
6449
6089
  mode: inputMode,
@@ -6470,14 +6110,14 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6470
6110
  inputContainerHeight,
6471
6111
  connectingIndicatorEnabled: connectingIndicator !== false
6472
6112
  });
6473
- const BoundSuggestionView = hasSuggestions ? require_MarkdownSurfaces.renderSlot(suggestionView, CopilotChatSuggestionView, {
6113
+ const BoundSuggestionView = hasSuggestions ? require_ProviderMarkdown.renderSlot(suggestionView, CopilotChatSuggestionView, {
6474
6114
  suggestions,
6475
6115
  loadingIndexes: suggestionLoadingIndexes,
6476
6116
  onSelectSuggestion,
6477
6117
  className: "cpk-chat-view-suggestion-view"
6478
6118
  }) : null;
6479
- const BoundConnectingIndicator = showConnectingIndicator ? require_MarkdownSurfaces.renderSlot(typeof connectingIndicator === "boolean" ? void 0 : connectingIndicator, CopilotChatView.ConnectingIndicator, {}) : null;
6480
- const BoundScrollView = require_MarkdownSurfaces.renderSlot(scrollView, CopilotChatView.ScrollView, {
6119
+ const BoundConnectingIndicator = showConnectingIndicator ? require_ProviderMarkdown.renderSlot(typeof connectingIndicator === "boolean" ? void 0 : connectingIndicator, CopilotChatView.ConnectingIndicator, {}) : null;
6120
+ const BoundScrollView = require_ProviderMarkdown.renderSlot(scrollView, CopilotChatView.ScrollView, {
6481
6121
  autoScroll,
6482
6122
  scrollThreadId,
6483
6123
  inputContainerHeight,
@@ -6499,7 +6139,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6499
6139
  })
6500
6140
  });
6501
6141
  if (showWelcomeScreen) {
6502
- const BoundInputForWelcome = require_MarkdownSurfaces.renderSlot(input, CopilotChatInput_default, {
6142
+ const BoundInputForWelcome = require_ProviderMarkdown.renderSlot(input, CopilotChatInput_default, {
6503
6143
  onSubmitMessage,
6504
6144
  onStop,
6505
6145
  mode: inputMode,
@@ -6523,7 +6163,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6523
6163
  className: "cpk-chat-view-welcome-attachment-queue"
6524
6164
  }), BoundInputForWelcome]
6525
6165
  });
6526
- const BoundWelcomeScreen = require_MarkdownSurfaces.renderSlot(welcomeScreenSlot, CopilotChatView.WelcomeScreen, {
6166
+ const BoundWelcomeScreen = require_ProviderMarkdown.renderSlot(welcomeScreenSlot, CopilotChatView.WelcomeScreen, {
6527
6167
  input: inputWithAttachments,
6528
6168
  suggestionView: BoundSuggestionView ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {})
6529
6169
  });
@@ -6677,7 +6317,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6677
6317
  previousScrollThreadId.current = scrollThreadId;
6678
6318
  startBottomPin(true);
6679
6319
  }, [scrollThreadId, startBottomPin]);
6680
- const BoundFeather = require_MarkdownSurfaces.renderSlot(feather, CopilotChatView.Feather, {});
6320
+ const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
6681
6321
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
6682
6322
  value: scrollEl,
6683
6323
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollPinnedContext.Provider, {
@@ -6698,7 +6338,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6698
6338
  !isAtBottom && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6699
6339
  className: "cpk-chat-view-scroll-to-bottom",
6700
6340
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
6701
- children: require_MarkdownSurfaces.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => startBottomPin() })
6341
+ children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => startBottomPin() })
6702
6342
  })
6703
6343
  ] })
6704
6344
  })
@@ -6712,7 +6352,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6712
6352
  spacerRef,
6713
6353
  topOffset: 16
6714
6354
  });
6715
- const BoundFeather = require_MarkdownSurfaces.renderSlot(feather, CopilotChatView.Feather, {});
6355
+ const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
6716
6356
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
6717
6357
  value: nonAutoScrollEl,
6718
6358
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -6740,7 +6380,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6740
6380
  showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6741
6381
  className: "cpk-chat-view-scroll-to-bottom",
6742
6382
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
6743
- children: require_MarkdownSurfaces.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
6383
+ children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
6744
6384
  })
6745
6385
  ]
6746
6386
  })
@@ -6793,7 +6433,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6793
6433
  })
6794
6434
  });
6795
6435
  if (mode === "none") {
6796
- const BoundFeather = require_MarkdownSurfaces.renderSlot(feather, CopilotChatView.Feather, {});
6436
+ const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
6797
6437
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
6798
6438
  value: nonAutoScrollEl,
6799
6439
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -6810,7 +6450,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6810
6450
  showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6811
6451
  className: "cpk-chat-view-scroll-to-bottom",
6812
6452
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
6813
- children: require_MarkdownSurfaces.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
6453
+ children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
6814
6454
  })
6815
6455
  ]
6816
6456
  })
@@ -6855,7 +6495,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6855
6495
  className: (0, _copilotkit_core.ɵcn)("cpk-chat-view-scroll-to-bottom-button", className),
6856
6496
  "aria-label": labels.chatScrollToBottomLabel,
6857
6497
  ...props,
6858
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
6498
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
6859
6499
  name: "ChevronDown",
6860
6500
  className: "cpk-chat-view-scroll-to-bottom-icon"
6861
6501
  })
@@ -6872,7 +6512,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6872
6512
  role: "status",
6873
6513
  className: (0, _copilotkit_core.ɵcn)("cpk-chat-view-connecting-indicator", className),
6874
6514
  ...props,
6875
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
6515
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
6876
6516
  name: "Loader2",
6877
6517
  className: "cpk-chat-view-connecting-spinner"
6878
6518
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -6890,7 +6530,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
6890
6530
  });
6891
6531
  };
6892
6532
  _CopilotChatView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
6893
- const BoundWelcomeMessage = require_MarkdownSurfaces.renderSlot(welcomeMessage, CopilotChatView.WelcomeMessage, {});
6533
+ const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView.WelcomeMessage, {});
6894
6534
  if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6895
6535
  "data-copilotkit": true,
6896
6536
  style: { display: "contents" },
@@ -7296,8 +6936,8 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
7296
6936
  setTranscribeMode("input");
7297
6937
  }, []);
7298
6938
  const handleFinishTranscribeWithAudio = (0, react.useCallback)((audioBlob) => submitter.transcribe(audioBlob), [submitter]);
7299
- const stableMessageView = require_chat.useShallowStableRef(typeof providedMessageView === "string" ? { className: providedMessageView } : providedMessageView);
7300
- const stableSuggestionView = require_chat.useShallowStableRef(providedSuggestionView);
6939
+ const stableMessageView = require_accessibility.useShallowStableRef(typeof providedMessageView === "string" ? { className: providedMessageView } : providedMessageView);
6940
+ const stableSuggestionView = require_accessibility.useShallowStableRef(providedSuggestionView);
7301
6941
  const handleAddFile = (0, react.useCallback)(() => {
7302
6942
  setTimeout(() => {
7303
6943
  fileInputRef.current?.click();
@@ -7318,7 +6958,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
7318
6958
  const messages = (0, react.useMemo)(() => [...agent.messages], [(0, _copilotkit_core.ɵmessagesFingerprint)(agent.messages)]);
7319
6959
  const [lastUserMessageTracker] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateLastUserMessageTracker)(messages));
7320
6960
  const lastUserMessageState = lastUserMessageTracker.update(messages);
7321
- const RenderedChatView = require_MarkdownSurfaces.renderSlot(chatView, CopilotChatView, {
6961
+ const RenderedChatView = require_ProviderMarkdown.renderSlot(chatView, CopilotChatView, {
7322
6962
  ...mergedProps,
7323
6963
  messages,
7324
6964
  onSubmitMessage: isReady ? onSubmitInput : void 0,
@@ -7400,14 +7040,14 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
7400
7040
  //#endregion
7401
7041
  //#region src/components/chat/CopilotChatToggleButton.tsx
7402
7042
  const ICON_CLASS = "cpk-chat-toggle-button-icon";
7403
- const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
7043
+ const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
7404
7044
  className: className ?? ICON_CLASS,
7405
7045
  strokeWidth: 1.75,
7406
7046
  fill: "currentColor",
7407
7047
  ...props,
7408
7048
  name: "MessageCircle"
7409
7049
  });
7410
- const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
7050
+ const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
7411
7051
  className: className ?? ICON_CLASS,
7412
7052
  strokeWidth: 1.75,
7413
7053
  ...props,
@@ -7430,12 +7070,12 @@ const CopilotChatToggleButton = react.default.forwardRef(function CopilotChatTog
7430
7070
  if (event.defaultPrevented) return;
7431
7071
  setModalOpen(!isOpen);
7432
7072
  };
7433
- const renderedOpenIcon = require_MarkdownSurfaces.renderSlot(openIcon, DefaultOpenIcon, {
7073
+ const renderedOpenIcon = require_ProviderMarkdown.renderSlot(openIcon, DefaultOpenIcon, {
7434
7074
  className: ICON_CLASS,
7435
7075
  "aria-hidden": true,
7436
7076
  focusable: false
7437
7077
  });
7438
- const renderedCloseIcon = require_MarkdownSurfaces.renderSlot(closeIcon, DefaultCloseIcon, {
7078
+ const renderedCloseIcon = require_ProviderMarkdown.renderSlot(closeIcon, DefaultCloseIcon, {
7439
7079
  className: ICON_CLASS,
7440
7080
  "aria-hidden": true,
7441
7081
  focusable: false
@@ -7540,9 +7180,9 @@ function CopilotModalHeader({ title, titleContent, closeButton, drawerLauncher,
7540
7180
  const handleToggleDrawer = (0, react.useCallback)(() => {
7541
7181
  configuration?.setDrawerOpen?.(!configuration.drawerOpen);
7542
7182
  }, [configuration]);
7543
- const BoundTitle = require_MarkdownSurfaces.renderSlot(titleContent, CopilotModalHeader.Title, { children: resolvedTitle });
7544
- const BoundCloseButton = require_MarkdownSurfaces.renderSlot(closeButton, CopilotModalHeader.CloseButton, { onClick: handleClose });
7545
- const BoundDrawerLauncher = drawerRegistered ? require_MarkdownSurfaces.renderSlot(drawerLauncher, CopilotModalHeader.DrawerLauncher, {
7183
+ const BoundTitle = require_ProviderMarkdown.renderSlot(titleContent, CopilotModalHeader.Title, { children: resolvedTitle });
7184
+ const BoundCloseButton = require_ProviderMarkdown.renderSlot(closeButton, CopilotModalHeader.CloseButton, { onClick: handleClose });
7185
+ const BoundDrawerLauncher = drawerRegistered ? require_ProviderMarkdown.renderSlot(drawerLauncher, CopilotModalHeader.DrawerLauncher, {
7546
7186
  onClick: handleToggleDrawer,
7547
7187
  "aria-expanded": configuration?.drawerOpen ?? false
7548
7188
  }) : null;
@@ -7593,7 +7233,7 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
7593
7233
  className: (0, _copilotkit_core.ɵcn)("cpk-modal-header-close-button", className),
7594
7234
  "aria-label": labels.modalHeaderCloseButtonLabel,
7595
7235
  ...props,
7596
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
7236
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
7597
7237
  name: "X",
7598
7238
  className: "cpk-modal-header-close-icon",
7599
7239
  "aria-hidden": "true"
@@ -7608,7 +7248,7 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
7608
7248
  className: (0, _copilotkit_core.ɵcn)("cpk-modal-header-drawer-launcher", className),
7609
7249
  "aria-label": labels.modalHeaderThreadsButtonLabel,
7610
7250
  ...props,
7611
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.CopilotIcon, {
7251
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
7612
7252
  name: "PanelLeftOpen",
7613
7253
  className: "cpk-modal-header-drawer-launcher-icon",
7614
7254
  "aria-hidden": "true"
@@ -7678,8 +7318,8 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
7678
7318
  position,
7679
7319
  widthCss
7680
7320
  ]);
7681
- const headerElement = require_MarkdownSurfaces.renderSlot(header, CopilotModalHeader, {});
7682
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [require_MarkdownSurfaces.renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk-sidebar-view-toggle-button-left" } : {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
7321
+ const headerElement = require_ProviderMarkdown.renderSlot(header, CopilotModalHeader, {});
7322
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [require_ProviderMarkdown.renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk-sidebar-view-toggle-button-left" } : {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
7683
7323
  ref: sidebarRef,
7684
7324
  "data-copilotkit": true,
7685
7325
  "data-testid": "copilot-sidebar",
@@ -7707,7 +7347,7 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
7707
7347
  CopilotSidebarView.displayName = "CopilotSidebarView";
7708
7348
  (function(_CopilotSidebarView) {
7709
7349
  _CopilotSidebarView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
7710
- const BoundWelcomeMessage = require_MarkdownSurfaces.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
7350
+ const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
7711
7351
  if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
7712
7352
  "data-copilotkit": true,
7713
7353
  style: { display: "contents" },
@@ -7786,8 +7426,8 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
7786
7426
  clickOutsideToClose,
7787
7427
  setModalOpen
7788
7428
  ]);
7789
- const headerElement = (0, react.useMemo)(() => require_MarkdownSurfaces.renderSlot(header, CopilotModalHeader, {}), [header]);
7790
- const toggleButtonElement = (0, react.useMemo)(() => require_MarkdownSurfaces.renderSlot(toggleButton, CopilotChatToggleButton, {}), [toggleButton]);
7429
+ const headerElement = (0, react.useMemo)(() => require_ProviderMarkdown.renderSlot(header, CopilotModalHeader, {}), [header]);
7430
+ const toggleButtonElement = (0, react.useMemo)(() => require_ProviderMarkdown.renderSlot(toggleButton, CopilotChatToggleButton, {}), [toggleButton]);
7791
7431
  const resolvedWidth = (0, _copilotkit_core.ɵdimensionToCss)(width, _copilotkit_core.ɵPOPUP_DEFAULT_WIDTH);
7792
7432
  const resolvedHeight = (0, _copilotkit_core.ɵdimensionToCss)(height, _copilotkit_core.ɵPOPUP_DEFAULT_HEIGHT);
7793
7433
  const popupStyle = (0, react.useMemo)(() => ({
@@ -7826,7 +7466,7 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
7826
7466
  CopilotPopupView.displayName = "CopilotPopupView";
7827
7467
  (function(_CopilotPopupView) {
7828
7468
  _CopilotPopupView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
7829
- const BoundWelcomeMessage = require_MarkdownSurfaces.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
7469
+ const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
7830
7470
  if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
7831
7471
  "data-copilotkit": true,
7832
7472
  style: { display: "contents" },
@@ -8746,7 +8386,7 @@ Object.defineProperty(exports, 'MEMORY_ERROR_REGISTRY', {
8746
8386
  return _copilotkit_core.MEMORY_ERROR_REGISTRY;
8747
8387
  }
8748
8388
  });
8749
- exports.MarkdownRendererProvider = require_MarkdownSurfaces.MarkdownRendererProvider;
8389
+ exports.MarkdownRendererProvider = require_ProviderMarkdown.MarkdownRendererProvider;
8750
8390
  Object.defineProperty(exports, 'MemoryError', {
8751
8391
  enumerable: true,
8752
8392
  get: function () {
@@ -9034,7 +8674,7 @@ Object.defineProperty(exports, 'StepStartedEventSchema', {
9034
8674
  return _ag_ui_core_schemas.StepStartedEventSchema;
9035
8675
  }
9036
8676
  });
9037
- exports.StreamingMarkdownDefaultRenderer = require_MarkdownSurfaces.StreamingMarkdownDefaultRenderer;
8677
+ exports.StreamingMarkdownDefaultRenderer = require_ProviderMarkdown.StreamingMarkdownDefaultRenderer;
9038
8678
  Object.defineProperty(exports, 'SubagentErrorEventSchema', {
9039
8679
  enumerable: true,
9040
8680
  get: function () {
@@ -9265,12 +8905,6 @@ Object.defineProperty(exports, 'WebMCPRegistry', {
9265
8905
  }
9266
8906
  });
9267
8907
  exports.WildcardToolCallRender = WildcardToolCallRender;
9268
- Object.defineProperty(exports, 'a2uiDefaultTheme', {
9269
- enumerable: true,
9270
- get: function () {
9271
- return _copilotkit_a2ui_renderer.defaultTheme;
9272
- }
9273
- });
9274
8908
  Object.defineProperty(exports, 'aggregateTokenUsage', {
9275
8909
  enumerable: true,
9276
8910
  get: function () {
@@ -9325,7 +8959,6 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
9325
8959
  return _ag_ui_client.convertToLegacyEvents;
9326
8960
  }
9327
8961
  });
9328
- exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
9329
8962
  Object.defineProperty(exports, 'createActionGroup', {
9330
8963
  enumerable: true,
9331
8964
  get: function () {
@@ -9674,7 +9307,7 @@ Object.defineProperty(exports, 'useLicenseContext', {
9674
9307
  return _copilotkit_react_core_context.useLicenseContext;
9675
9308
  }
9676
9309
  });
9677
- exports.useMarkdownRenderer = require_MarkdownSurfaces.useMarkdownRenderer;
9310
+ exports.useMarkdownRenderer = require_ProviderMarkdown.useMarkdownRenderer;
9678
9311
  exports.useMemories = useMemories;
9679
9312
  exports.useRenderActivityMessage = useRenderActivityMessage;
9680
9313
  exports.useRenderCustomMessages = useRenderCustomMessages;
@@ -9695,66 +9328,6 @@ Object.defineProperty(exports, 'withAuthoritativeActivityTypes', {
9695
9328
  return _ag_ui_client.withAuthoritativeActivityTypes;
9696
9329
  }
9697
9330
  });
9698
- Object.defineProperty(exports, 'ɵA2UIActivityController', {
9699
- enumerable: true,
9700
- get: function () {
9701
- return _copilotkit_core.ɵA2UIActivityController;
9702
- }
9703
- });
9704
- Object.defineProperty(exports, 'ɵA2UI_DEFAULT_SURFACE_ID', {
9705
- enumerable: true,
9706
- get: function () {
9707
- return _copilotkit_core.ɵA2UI_DEFAULT_SURFACE_ID;
9708
- }
9709
- });
9710
- Object.defineProperty(exports, 'ɵA2UI_LIFECYCLE_TEXT', {
9711
- enumerable: true,
9712
- get: function () {
9713
- return _copilotkit_core.ɵA2UI_LIFECYCLE_TEXT;
9714
- }
9715
- });
9716
- Object.defineProperty(exports, 'ɵA2UI_OPERATIONS_KEY', {
9717
- enumerable: true,
9718
- get: function () {
9719
- return _copilotkit_core.ɵA2UI_OPERATIONS_KEY;
9720
- }
9721
- });
9722
- Object.defineProperty(exports, 'ɵA2UI_PAINT_FALLBACK_MS', {
9723
- enumerable: true,
9724
- get: function () {
9725
- return _copilotkit_core.ɵA2UI_PAINT_FALLBACK_MS;
9726
- }
9727
- });
9728
- Object.defineProperty(exports, 'ɵA2UI_RECOVERY_DEFAULTS', {
9729
- enumerable: true,
9730
- get: function () {
9731
- return _copilotkit_core.ɵA2UI_RECOVERY_DEFAULTS;
9732
- }
9733
- });
9734
- Object.defineProperty(exports, 'ɵA2UI_ROOT_COMPONENT_ID', {
9735
- enumerable: true,
9736
- get: function () {
9737
- return _copilotkit_core.ɵA2UI_ROOT_COMPONENT_ID;
9738
- }
9739
- });
9740
- Object.defineProperty(exports, 'ɵA2UI_SKELETON_ROWS', {
9741
- enumerable: true,
9742
- get: function () {
9743
- return _copilotkit_core.ɵA2UI_SKELETON_ROWS;
9744
- }
9745
- });
9746
- Object.defineProperty(exports, 'ɵA2UI_SURFACE_ACTIVITY_TYPE', {
9747
- enumerable: true,
9748
- get: function () {
9749
- return _copilotkit_core.ɵA2UI_SURFACE_ACTIVITY_TYPE;
9750
- }
9751
- });
9752
- Object.defineProperty(exports, 'ɵA2UI_SURFACE_CONTENT_SCHEMA', {
9753
- enumerable: true,
9754
- get: function () {
9755
- return _copilotkit_core.ɵA2UI_SURFACE_CONTENT_SCHEMA;
9756
- }
9757
- });
9758
9331
  Object.defineProperty(exports, 'ɵALL_AGENT_UPDATES', {
9759
9332
  enumerable: true,
9760
9333
  get: function () {
@@ -10055,12 +9628,6 @@ Object.defineProperty(exports, 'ɵPlaceholderCycler', {
10055
9628
  return _copilotkit_core.ɵPlaceholderCycler;
10056
9629
  }
10057
9630
  });
10058
- Object.defineProperty(exports, 'ɵRENDER_A2UI_TOOL_NAME', {
10059
- enumerable: true,
10060
- get: function () {
10061
- return _copilotkit_core.ɵRENDER_A2UI_TOOL_NAME;
10062
- }
10063
- });
10064
9631
  Object.defineProperty(exports, 'ɵRESIZE_SETTLE_MS', {
10065
9632
  enumerable: true,
10066
9633
  get: function () {
@@ -10445,24 +10012,6 @@ Object.defineProperty(exports, 'ɵdescribeUnrenderedToolCalls', {
10445
10012
  return _copilotkit_core.ɵdescribeUnrenderedToolCalls;
10446
10013
  }
10447
10014
  });
10448
- Object.defineProperty(exports, 'ɵdiagnoseMissingSurface', {
10449
- enumerable: true,
10450
- get: function () {
10451
- return _copilotkit_core.ɵdiagnoseMissingSurface;
10452
- }
10453
- });
10454
- Object.defineProperty(exports, 'ɵdiagnoseUnpaintedSurface', {
10455
- enumerable: true,
10456
- get: function () {
10457
- return _copilotkit_core.ɵdiagnoseUnpaintedSurface;
10458
- }
10459
- });
10460
- Object.defineProperty(exports, 'ɵdiagnoseUnresolvedRoot', {
10461
- enumerable: true,
10462
- get: function () {
10463
- return _copilotkit_core.ɵdiagnoseUnresolvedRoot;
10464
- }
10465
- });
10466
10015
  Object.defineProperty(exports, 'ɵdimensionToCss', {
10467
10016
  enumerable: true,
10468
10017
  get: function () {
@@ -10535,18 +10084,6 @@ Object.defineProperty(exports, 'ɵflattenUserMessageContent', {
10535
10084
  return _copilotkit_core.ɵflattenUserMessageContent;
10536
10085
  }
10537
10086
  });
10538
- Object.defineProperty(exports, 'ɵformatA2UIDebugPayload', {
10539
- enumerable: true,
10540
- get: function () {
10541
- return _copilotkit_core.ɵformatA2UIDebugPayload;
10542
- }
10543
- });
10544
- Object.defineProperty(exports, 'ɵformatA2UIRetryLabel', {
10545
- enumerable: true,
10546
- get: function () {
10547
- return _copilotkit_core.ɵformatA2UIRetryLabel;
10548
- }
10549
- });
10550
10087
  Object.defineProperty(exports, 'ɵformatCountLabel', {
10551
10088
  enumerable: true,
10552
10089
  get: function () {
@@ -10583,24 +10120,6 @@ Object.defineProperty(exports, 'ɵformatWorkDuration', {
10583
10120
  return _copilotkit_core.ɵformatWorkDuration;
10584
10121
  }
10585
10122
  });
10586
- Object.defineProperty(exports, 'ɵgetA2UIOperationSurfaceId', {
10587
- enumerable: true,
10588
- get: function () {
10589
- return _copilotkit_core.ɵgetA2UIOperationSurfaceId;
10590
- }
10591
- });
10592
- Object.defineProperty(exports, 'ɵgetA2UIOperations', {
10593
- enumerable: true,
10594
- get: function () {
10595
- return _copilotkit_core.ɵgetA2UIOperations;
10596
- }
10597
- });
10598
- Object.defineProperty(exports, 'ɵgetA2UIProgressPhase', {
10599
- enumerable: true,
10600
- get: function () {
10601
- return _copilotkit_core.ɵgetA2UIProgressPhase;
10602
- }
10603
- });
10604
10123
  Object.defineProperty(exports, 'ɵgetAgentCapabilities', {
10605
10124
  enumerable: true,
10606
10125
  get: function () {
@@ -10775,12 +10294,6 @@ Object.defineProperty(exports, 'ɵgetWorkSummaryText', {
10775
10294
  return _copilotkit_core.ɵgetWorkSummaryText;
10776
10295
  }
10777
10296
  });
10778
- Object.defineProperty(exports, 'ɵgroupA2UIOperationsBySurface', {
10779
- enumerable: true,
10780
- get: function () {
10781
- return _copilotkit_core.ɵgroupA2UIOperationsBySurface;
10782
- }
10783
- });
10784
10297
  Object.defineProperty(exports, 'ɵhasAssistantMessageText', {
10785
10298
  enumerable: true,
10786
10299
  get: function () {
@@ -11075,12 +10588,6 @@ Object.defineProperty(exports, 'ɵpublicKeyHeaderDefaults', {
11075
10588
  return _copilotkit_core.ɵpublicKeyHeaderDefaults;
11076
10589
  }
11077
10590
  });
11078
- Object.defineProperty(exports, 'ɵreadA2UILifecycle', {
11079
- enumerable: true,
11080
- get: function () {
11081
- return _copilotkit_core.ɵreadA2UILifecycle;
11082
- }
11083
- });
11084
10591
  Object.defineProperty(exports, 'ɵreadKeyboardState', {
11085
10592
  enumerable: true,
11086
10593
  get: function () {
@@ -11129,18 +10636,6 @@ Object.defineProperty(exports, 'ɵresetMessageFeedbackCache', {
11129
10636
  return _copilotkit_core.ɵresetMessageFeedbackCache;
11130
10637
  }
11131
10638
  });
11132
- Object.defineProperty(exports, 'ɵresolveA2UIActivation', {
11133
- enumerable: true,
11134
- get: function () {
11135
- return _copilotkit_core.ɵresolveA2UIActivation;
11136
- }
11137
- });
11138
- Object.defineProperty(exports, 'ɵresolveA2UIDebugExposure', {
11139
- enumerable: true,
11140
- get: function () {
11141
- return _copilotkit_core.ɵresolveA2UIDebugExposure;
11142
- }
11143
- });
11144
10639
  Object.defineProperty(exports, 'ɵresolveActivityRenderer', {
11145
10640
  enumerable: true,
11146
10641
  get: function () {
@@ -11183,6 +10678,12 @@ Object.defineProperty(exports, 'ɵresolveCustomMessageRenderers', {
11183
10678
  return _copilotkit_core.ɵresolveCustomMessageRenderers;
11184
10679
  }
11185
10680
  });
10681
+ Object.defineProperty(exports, 'ɵresolveGenerativeUIDefault', {
10682
+ enumerable: true,
10683
+ get: function () {
10684
+ return _copilotkit_core.ɵresolveGenerativeUIDefault;
10685
+ }
10686
+ });
11186
10687
  Object.defineProperty(exports, 'ɵresolveLicenseState', {
11187
10688
  enumerable: true,
11188
10689
  get: function () {
@@ -11225,12 +10726,6 @@ Object.defineProperty(exports, 'ɵrmsAmplitude', {
11225
10726
  return _copilotkit_core.ɵrmsAmplitude;
11226
10727
  }
11227
10728
  });
11228
- Object.defineProperty(exports, 'ɵrunA2UIAction', {
11229
- enumerable: true,
11230
- get: function () {
11231
- return _copilotkit_core.ɵrunA2UIAction;
11232
- }
11233
- });
11234
10729
  Object.defineProperty(exports, 'ɵrunMcpFollowUp', {
11235
10730
  enumerable: true,
11236
10731
  get: function () {
@@ -11411,12 +10906,6 @@ Object.defineProperty(exports, 'ɵsubscribeToMessageFeedback', {
11411
10906
  return _copilotkit_core.ɵsubscribeToMessageFeedback;
11412
10907
  }
11413
10908
  });
11414
- Object.defineProperty(exports, 'ɵsurfaceHasRenderableContent', {
11415
- enumerable: true,
11416
- get: function () {
11417
- return _copilotkit_core.ɵsurfaceHasRenderableContent;
11418
- }
11419
- });
11420
10909
  Object.defineProperty(exports, 'ɵsyncRecorderToMode', {
11421
10910
  enumerable: true,
11422
10911
  get: function () {
@@ -11429,12 +10918,6 @@ Object.defineProperty(exports, 'ɵthreadAdapterEvents', {
11429
10918
  return _copilotkit_core.ɵthreadAdapterEvents;
11430
10919
  }
11431
10920
  });
11432
- Object.defineProperty(exports, 'ɵtoA2UIClientEvent', {
11433
- enumerable: true,
11434
- get: function () {
11435
- return _copilotkit_core.ɵtoA2UIClientEvent;
11436
- }
11437
- });
11438
10921
  Object.defineProperty(exports, 'ɵtoDefaultToolCallStatus', {
11439
10922
  enumerable: true,
11440
10923
  get: function () {