@copilotkit/react-core 2.0.0-rc.42 → 2.0.0-rc.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts → MarkdownRendererContext-CytkPOAJ.d.mts} +1 -1
- package/dist/{MarkdownRendererContext-BL8ct_3U.d.mts.map → MarkdownRendererContext-CytkPOAJ.d.mts.map} +1 -1
- package/dist/MarkdownSurfaces-DlYqJkAE.mjs +135 -0
- package/dist/MarkdownSurfaces-DlYqJkAE.mjs.map +1 -0
- package/dist/MarkdownSurfaces-DytbRzj2.cjs +141 -0
- package/dist/MarkdownSurfaces-DytbRzj2.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-Byz821bg.mjs → ProviderMarkdown-BZaPDROY.mjs} +6 -132
- package/dist/ProviderMarkdown-BZaPDROY.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-D2Ck-cbb.cjs → ProviderMarkdown-i_i2osOH.cjs} +4 -136
- package/dist/ProviderMarkdown-i_i2osOH.cjs.map +1 -0
- package/dist/accessibility-BLK-gE0R.mjs +129 -0
- package/dist/accessibility-BLK-gE0R.mjs.map +1 -0
- package/dist/accessibility-GnodqxkH.cjs +228 -0
- package/dist/accessibility-GnodqxkH.cjs.map +1 -0
- package/dist/{chat-Bf0vVdo7.mjs → chat-B1zczXUD.mjs} +21 -145
- package/dist/chat-B1zczXUD.mjs.map +1 -0
- package/dist/{chat-DgP2N7bD.d.mts → chat-C5XWeO1M.d.mts} +1 -1
- package/dist/{chat-DgP2N7bD.d.mts.map → chat-C5XWeO1M.d.mts.map} +1 -1
- package/dist/{chat-D3fxo6Ah.cjs → chat-CkFZMo5E.cjs} +29 -234
- package/dist/chat-CkFZMo5E.cjs.map +1 -0
- package/dist/context.cjs +2 -2
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts +2 -2
- package/dist/context.d.mts +2 -2
- package/dist/context.mjs +2 -2
- package/dist/context.mjs.map +1 -1
- package/dist/generative-ui/native.cjs +9 -8
- package/dist/generative-ui/native.cjs.map +1 -1
- package/dist/generative-ui/native.d.cts.map +1 -1
- package/dist/generative-ui/native.d.mts +2 -2
- package/dist/generative-ui/native.d.mts.map +1 -1
- package/dist/generative-ui/native.mjs +4 -3
- package/dist/generative-ui/native.mjs.map +1 -1
- package/dist/generative-ui.cjs +11 -5767
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.d.mts +4 -4
- package/dist/generative-ui.mjs +8 -5764
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/{hooks-BRYonCVu.d.mts → hooks-DqsOIh8A.d.mts} +3 -3
- package/dist/{hooks-BRYonCVu.d.mts.map → hooks-DqsOIh8A.d.mts.map} +1 -1
- package/dist/index.cjs +180 -683
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -102
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +11 -104
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +64 -409
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +6132 -797
- package/dist/index.umd.js.map +1 -1
- package/dist/{refs-BIUfn1wb.cjs → refs-B5Dn59Pn.cjs} +2 -2
- package/dist/{refs-BIUfn1wb.cjs.map → refs-B5Dn59Pn.cjs.map} +1 -1
- package/dist/{refs-CMrRm3ta.mjs → refs-BW15wX_V.mjs} +1 -1
- package/dist/{refs-CMrRm3ta.mjs.map → refs-BW15wX_V.mjs.map} +1 -1
- package/dist/standard-CqGTZUZy.cjs +5780 -0
- package/dist/standard-CqGTZUZy.cjs.map +1 -0
- package/dist/standard-s8jByRiE.mjs +5784 -0
- package/dist/standard-s8jByRiE.mjs.map +1 -0
- package/dist/{use-generative-ui-root-C12htqbK.cjs → use-generative-ui-root-CIp0ytE6.cjs} +3 -3
- package/dist/{use-generative-ui-root-C12htqbK.cjs.map → use-generative-ui-root-CIp0ytE6.cjs.map} +1 -1
- package/dist/{use-generative-ui-root-CVgsDy1f.mjs → use-generative-ui-root-oBqPa6uy.mjs} +3 -2
- package/dist/{use-generative-ui-root-CVgsDy1f.mjs.map → use-generative-ui-root-oBqPa6uy.mjs.map} +1 -1
- package/package.json +7 -10
- package/dist/MarkdownSurfaces-Byz821bg.mjs.map +0 -1
- package/dist/MarkdownSurfaces-D2Ck-cbb.cjs.map +0 -1
- package/dist/chat-Bf0vVdo7.mjs.map +0 -1
- package/dist/chat-D3fxo6Ah.cjs.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
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const require_accessibility = require('./accessibility-GnodqxkH.cjs');
|
|
5
|
+
const require_ProviderMarkdown = require('./ProviderMarkdown-i_i2osOH.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-DytbRzj2.cjs');
|
|
7
9
|
let _copilotkit_core = require("@copilotkit/core");
|
|
8
10
|
let react = require("react");
|
|
9
|
-
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 =
|
|
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 =
|
|
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 =
|
|
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");
|
|
@@ -180,7 +177,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
180
177
|
"data-inset": inset,
|
|
181
178
|
className: (0, _copilotkit_core.ɵcn)("cpk-dropdown-menu-sub-trigger", className),
|
|
182
179
|
...props,
|
|
183
|
-
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
180
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
184
181
|
name: "ChevronRight",
|
|
185
182
|
className: "cpk-dropdown-menu-sub-trigger-icon"
|
|
186
183
|
})]
|
|
@@ -331,7 +328,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
331
328
|
if (!onSubmitMessage) return;
|
|
332
329
|
if (composer.submit(onSubmitMessage, { value: resolvedValue })) inputRef.current?.focus();
|
|
333
330
|
};
|
|
334
|
-
const BoundTextArea =
|
|
331
|
+
const BoundTextArea = require_ProviderMarkdown.renderSlot(textArea, CopilotChatInput.TextArea, {
|
|
335
332
|
ref: inputRef,
|
|
336
333
|
value: resolvedValue,
|
|
337
334
|
onChange: handleChange,
|
|
@@ -346,19 +343,19 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
346
343
|
}
|
|
347
344
|
send();
|
|
348
345
|
};
|
|
349
|
-
const BoundAudioRecorder =
|
|
346
|
+
const BoundAudioRecorder = require_ProviderMarkdown.renderSlot(audioRecorder, CopilotChatAudioRecorder, { ref: audioRecorderRef });
|
|
350
347
|
const showsStop = buttonAction === "stop";
|
|
351
|
-
const BoundSendButton =
|
|
348
|
+
const BoundSendButton = require_ProviderMarkdown.renderSlot(sendButton, CopilotChatInput.SendButton, {
|
|
352
349
|
onClick: handleSendButtonClick,
|
|
353
350
|
disabled: buttonDisabled,
|
|
354
351
|
"aria-label": showsStop ? labels.chatInputToolbarStopButtonLabel : labels.chatInputToolbarSendButtonLabel,
|
|
355
|
-
children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
352
|
+
children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
356
353
|
name: "Square",
|
|
357
354
|
className: "cpk-chat-input-stop-icon"
|
|
358
355
|
}) : void 0
|
|
359
356
|
});
|
|
360
|
-
const BoundStartTranscribeButton =
|
|
361
|
-
const BoundCancelTranscribeButton =
|
|
357
|
+
const BoundStartTranscribeButton = require_ProviderMarkdown.renderSlot(startTranscribeButton, CopilotChatInput.StartTranscribeButton, { onClick: onStartTranscribe });
|
|
358
|
+
const BoundCancelTranscribeButton = require_ProviderMarkdown.renderSlot(cancelTranscribeButton, CopilotChatInput.CancelTranscribeButton, { onClick: onCancelTranscribe });
|
|
362
359
|
const handleFinishTranscribe = (0, react.useCallback)(async () => {
|
|
363
360
|
const recorder = audioRecorderRef.current;
|
|
364
361
|
if (recorder && recorder.state === "recording") try {
|
|
@@ -369,13 +366,13 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
369
366
|
}
|
|
370
367
|
onFinishTranscribe?.();
|
|
371
368
|
}, [onFinishTranscribe, onFinishTranscribeWithAudio]);
|
|
372
|
-
const BoundFinishTranscribeButton =
|
|
373
|
-
const BoundAddMenuButton =
|
|
369
|
+
const BoundFinishTranscribeButton = require_ProviderMarkdown.renderSlot(finishTranscribeButton, CopilotChatInput.FinishTranscribeButton, { onClick: handleFinishTranscribe });
|
|
370
|
+
const BoundAddMenuButton = require_ProviderMarkdown.renderSlot(addMenuButton, CopilotChatInput.AddMenuButton, {
|
|
374
371
|
disabled: mode === "transcribe",
|
|
375
372
|
onAddFile,
|
|
376
373
|
toolsMenu
|
|
377
374
|
});
|
|
378
|
-
const BoundDisclaimer =
|
|
375
|
+
const BoundDisclaimer = require_ProviderMarkdown.renderSlot(disclaimer, CopilotChatInput.Disclaimer, {});
|
|
379
376
|
const shouldShowDisclaimer = (0, _copilotkit_core.ɵshowsComposerDisclaimer)({
|
|
380
377
|
showDisclaimer,
|
|
381
378
|
positioning
|
|
@@ -444,7 +441,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
444
441
|
className: "cpk-chat-input-field",
|
|
445
442
|
children: mode === "transcribe" ? BoundAudioRecorder : mode === "processing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
446
443
|
className: "cpk-chat-input-processing",
|
|
447
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
444
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
448
445
|
name: "Loader2",
|
|
449
446
|
className: "cpk-chat-input-processing-spinner"
|
|
450
447
|
})
|
|
@@ -518,7 +515,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
518
515
|
className: (0, _copilotkit_core.ɵcn)("cpk-chat-input-send-button", className),
|
|
519
516
|
"aria-label": labels.chatInputToolbarSendButtonLabel,
|
|
520
517
|
...props,
|
|
521
|
-
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
518
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
522
519
|
name: "ArrowUp",
|
|
523
520
|
className: "cpk-chat-input-send-icon"
|
|
524
521
|
})
|
|
@@ -545,7 +542,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
545
542
|
};
|
|
546
543
|
_CopilotChatInput.StartTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
|
|
547
544
|
"data-testid": "copilot-start-transcribe-button",
|
|
548
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
545
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
549
546
|
name: "Mic",
|
|
550
547
|
className: "cpk-chat-input-toolbar-icon"
|
|
551
548
|
}),
|
|
@@ -555,7 +552,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
555
552
|
});
|
|
556
553
|
_CopilotChatInput.CancelTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
|
|
557
554
|
"data-testid": "copilot-cancel-transcribe-button",
|
|
558
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
555
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
559
556
|
name: "X",
|
|
560
557
|
className: "cpk-chat-input-toolbar-icon"
|
|
561
558
|
}),
|
|
@@ -565,7 +562,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
565
562
|
});
|
|
566
563
|
_CopilotChatInput.FinishTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
|
|
567
564
|
"data-testid": "copilot-finish-transcribe-button",
|
|
568
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
565
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
569
566
|
name: "Check",
|
|
570
567
|
className: "cpk-chat-input-toolbar-icon"
|
|
571
568
|
}),
|
|
@@ -604,7 +601,7 @@ function CopilotChatInput({ mode = "input", onSubmitMessage, onStop, isRunning =
|
|
|
604
601
|
disabled: isDisabled,
|
|
605
602
|
"aria-label": labels.chatInputToolbarAddButtonLabel,
|
|
606
603
|
...props,
|
|
607
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
604
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
608
605
|
name: "Plus",
|
|
609
606
|
className: "cpk-chat-input-add-menu-icon"
|
|
610
607
|
})
|
|
@@ -824,7 +821,7 @@ function ɵuseOwnedCore(ref, create) {
|
|
|
824
821
|
|
|
825
822
|
//#endregion
|
|
826
823
|
//#region package.json
|
|
827
|
-
var version$1 = "2.0.0-rc.
|
|
824
|
+
var version$1 = "2.0.0-rc.43";
|
|
828
825
|
|
|
829
826
|
//#endregion
|
|
830
827
|
//#region src/components/CopilotKitInspector.tsx
|
|
@@ -1113,364 +1110,62 @@ const OpenGenerativeUIToolRenderer = function OpenGenerativeUIToolRenderer(props
|
|
|
1113
1110
|
};
|
|
1114
1111
|
|
|
1115
1112
|
//#endregion
|
|
1116
|
-
//#region src/
|
|
1113
|
+
//#region src/generative-ui/use-standard-ui-fallback.ts
|
|
1117
1114
|
/**
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1115
|
+
* The standard UI, loaded once on first use. It is a dynamic import so the
|
|
1116
|
+
* standard components (chart, map, media, ...) stay out of the main entry:
|
|
1117
|
+
* an app that does not use generative UI never downloads them.
|
|
1120
1118
|
*/
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
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
|
-
}
|
|
1150
|
-
/**
|
|
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.
|
|
1153
|
-
*/
|
|
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;
|
|
1119
|
+
let standardUIPromise;
|
|
1120
|
+
function loadStandardUI() {
|
|
1121
|
+
if (!standardUIPromise) {
|
|
1122
|
+
standardUIPromise = Promise.resolve().then(() => require("./standard-CqGTZUZy.cjs")).then((n) => n.standard_exports).then((module) => module.standardUI);
|
|
1123
|
+
standardUIPromise.catch(() => {
|
|
1124
|
+
standardUIPromise = void 0;
|
|
1125
|
+
});
|
|
1309
1126
|
}
|
|
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
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
/**
|
|
1380
|
-
* Renders a single A2UI surface using the React renderer.
|
|
1381
|
-
* Wraps A2UIProvider + A2UIRenderer and bridges actions back to CopilotKit.
|
|
1382
|
-
*/
|
|
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
|
-
})] });
|
|
1127
|
+
return standardUIPromise;
|
|
1422
1128
|
}
|
|
1423
1129
|
/**
|
|
1424
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1130
|
+
* The generative UI config of the provider. That is the `generativeUI` prop
|
|
1131
|
+
* when the app sets one. Otherwise, when the runtime turns generative UI on,
|
|
1132
|
+
* it is the standard UI for the agents of the runtime, once the standard UI
|
|
1133
|
+
* has loaded. `undefined` while generative UI is off, or still loading.
|
|
1427
1134
|
*/
|
|
1428
|
-
function
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1431
|
-
|
|
1135
|
+
function useStandardUIFallback(generativeUI, runtimeInfo) {
|
|
1136
|
+
const fallback = (0, _copilotkit_core.ɵresolveGenerativeUIDefault)({
|
|
1137
|
+
runtimeEnabled: runtimeInfo?.generativeUIEnabled ?? false,
|
|
1138
|
+
runtimeAgents: runtimeInfo?.generativeUIAgents,
|
|
1139
|
+
hasUI: !!generativeUI?.ui
|
|
1140
|
+
});
|
|
1141
|
+
const active = fallback.active;
|
|
1142
|
+
const agentIds = fallback.active ? fallback.agentIds : void 0;
|
|
1143
|
+
const [standardUI, setStandardUI] = (0, react.useState)();
|
|
1432
1144
|
(0, react.useEffect)(() => {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1145
|
+
if (!active || standardUI) return;
|
|
1146
|
+
let cancelled = false;
|
|
1147
|
+
loadStandardUI().then((ui) => {
|
|
1148
|
+
if (!cancelled) setStandardUI(ui);
|
|
1149
|
+
}, (error) => {
|
|
1150
|
+
console.error("[generativeUI] could not load the standard UI for the runtime's generative UI:", error);
|
|
1151
|
+
});
|
|
1152
|
+
return () => {
|
|
1153
|
+
cancelled = true;
|
|
1154
|
+
};
|
|
1155
|
+
}, [active, standardUI]);
|
|
1156
|
+
return (0, react.useMemo)(() => {
|
|
1157
|
+
if (generativeUI) return generativeUI;
|
|
1158
|
+
if (!active || !standardUI) return void 0;
|
|
1159
|
+
return {
|
|
1160
|
+
ui: standardUI,
|
|
1161
|
+
agentIds
|
|
1162
|
+
};
|
|
1436
1163
|
}, [
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
diagnostics
|
|
1164
|
+
generativeUI,
|
|
1165
|
+
active,
|
|
1166
|
+
standardUI,
|
|
1167
|
+
agentIds
|
|
1442
1168
|
]);
|
|
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
1169
|
}
|
|
1475
1170
|
|
|
1476
1171
|
//#endregion
|
|
@@ -1542,8 +1237,8 @@ var CopilotKitCoreReact = class extends _copilotkit_core.CopilotKitCore {
|
|
|
1542
1237
|
this._renderers.removeHookToolCall(name, agentId);
|
|
1543
1238
|
}
|
|
1544
1239
|
/**
|
|
1545
|
-
* @internal Add a renderer for a tool a built-in feature owns
|
|
1546
|
-
* generative UI). Prop and hook renderers with the same name and agent win
|
|
1240
|
+
* @internal Add a renderer for a tool a built-in feature owns
|
|
1241
|
+
* (generative UI). Prop and hook renderers with the same name and agent win
|
|
1547
1242
|
* over it, and `setRenderToolCalls` never removes it.
|
|
1548
1243
|
*
|
|
1549
1244
|
* @returns A function that removes the renderer.
|
|
@@ -1639,7 +1334,7 @@ function useStableArrayProp(prop, name) {
|
|
|
1639
1334
|
return value;
|
|
1640
1335
|
}
|
|
1641
1336
|
/** 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,
|
|
1337
|
+
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
1338
|
const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
|
|
1644
1339
|
const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
|
|
1645
1340
|
const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
|
|
@@ -1653,18 +1348,12 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1653
1348
|
}, [enableInspector]);
|
|
1654
1349
|
const [inspectorOpenRequest, setInspectorOpenRequest] = (0, react.useState)(null);
|
|
1655
1350
|
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
1351
|
const openGenUIActive = (0, _copilotkit_core.ɵisOpenGenerativeUIActive)({
|
|
1660
|
-
runtimeEnabled:
|
|
1352
|
+
runtimeEnabled: runtimeInfo?.openGenerativeUIEnabled ?? false,
|
|
1661
1353
|
configured: !!openGenerativeUI
|
|
1662
1354
|
});
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1665
|
-
hasCatalog: !!a2ui?.catalog
|
|
1666
|
-
}).active;
|
|
1667
|
-
const generativeUIActive = !!generativeUI?.ui;
|
|
1355
|
+
const generativeUIConfig = useStandardUIFallback(generativeUI, runtimeInfo);
|
|
1356
|
+
const generativeUIActive = !!generativeUIConfig?.ui;
|
|
1668
1357
|
const runtimeLicenseStatus = runtimeInfo?.licenseStatus;
|
|
1669
1358
|
const runtimeEntitlements = runtimeInfo?.runtimeEntitlements;
|
|
1670
1359
|
const runtimeEntitlementRetryPending = runtimeInfo?.runtimeEntitlementRetryPending ?? false;
|
|
@@ -1685,23 +1374,9 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1685
1374
|
const renderCustomMessagesList = useStableArrayProp(renderCustomMessages, "renderCustomMessages");
|
|
1686
1375
|
const renderActivityMessagesList = useStableArrayProp(renderActivityMessages, "renderActivityMessages");
|
|
1687
1376
|
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
1377
|
const mcpAppsAllowSameOrigin = mcpApps?.allowSameOriginFallback === true;
|
|
1696
1378
|
const allActivityRenderers = (0, react.useMemo)(() => (0, _copilotkit_core.ɵassembleActivityRenderers)({
|
|
1697
1379
|
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
1380
|
builtIns: [
|
|
1706
1381
|
{
|
|
1707
1382
|
activityType: _copilotkit_mcp_apps_renderer_activity.MCPAppsActivityType,
|
|
@@ -1718,11 +1393,8 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1718
1393
|
]
|
|
1719
1394
|
}), [
|
|
1720
1395
|
renderActivityMessagesList,
|
|
1721
|
-
a2uiActive,
|
|
1722
1396
|
openGenUIActive,
|
|
1723
1397
|
generativeUIActive,
|
|
1724
|
-
a2ui,
|
|
1725
|
-
filteredCatalog,
|
|
1726
1398
|
mcpAppsAllowSameOrigin
|
|
1727
1399
|
]);
|
|
1728
1400
|
const resolvedConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵresolveProviderConfig)({
|
|
@@ -1732,8 +1404,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1732
1404
|
useSingleEndpoint,
|
|
1733
1405
|
agents__unsafe_dev_only: agents,
|
|
1734
1406
|
selfManagedAgents,
|
|
1735
|
-
properties
|
|
1736
|
-
a2uiCatalog: a2ui?.catalog
|
|
1407
|
+
properties
|
|
1737
1408
|
}), [
|
|
1738
1409
|
runtimeUrl,
|
|
1739
1410
|
publicApiKey,
|
|
@@ -1741,8 +1412,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1741
1412
|
useSingleEndpoint,
|
|
1742
1413
|
agents,
|
|
1743
1414
|
selfManagedAgents,
|
|
1744
|
-
properties
|
|
1745
|
-
a2ui?.catalog
|
|
1415
|
+
properties
|
|
1746
1416
|
]);
|
|
1747
1417
|
const resolvedPublicKey = resolvedConfig.publicKey;
|
|
1748
1418
|
const loggedDiagnosticsRef = (0, react.useRef)(/* @__PURE__ */ new Set());
|
|
@@ -1812,22 +1482,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1812
1482
|
onError,
|
|
1813
1483
|
learning: learningConfig
|
|
1814
1484
|
}));
|
|
1815
|
-
const generativeUIRuntime = require_use_generative_ui_root.useGenerativeUIRoot(copilotkit,
|
|
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]);
|
|
1485
|
+
const generativeUIRuntime = require_use_generative_ui_root.useGenerativeUIRoot(copilotkit, generativeUIConfig);
|
|
1831
1486
|
(0, react.useEffect)(() => {
|
|
1832
1487
|
const syncRuntimeInfo = () => setRuntimeInfo(copilotkit.ɵruntimeInfo);
|
|
1833
1488
|
const unsubscribe = copilotkit.ɵsubscribeToRuntimeInfo(syncRuntimeInfo);
|
|
@@ -1949,15 +1604,14 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
|
|
|
1949
1604
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_copilotkit_react_core_context.LicenseContext.Provider, {
|
|
1950
1605
|
value: licenseState.context,
|
|
1951
1606
|
children: [
|
|
1952
|
-
a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIBuiltInToolCallRenderer, {}),
|
|
1953
1607
|
generativeUIActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_chat.GenerativeUIToolCallRenderer, {}),
|
|
1954
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1608
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.MarkdownRendererProvider, {
|
|
1955
1609
|
renderer: markdownRenderer,
|
|
1956
1610
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CopilotKitInspectorContextProvider, {
|
|
1957
1611
|
value: inspectorContextValue,
|
|
1958
1612
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_react_core_context.CopilotKitAgentIdContext.Provider, {
|
|
1959
1613
|
value: agentId,
|
|
1960
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1614
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_accessibility.GenerativeUIRuntimeContext.Provider, {
|
|
1961
1615
|
value: generativeUIRuntime,
|
|
1962
1616
|
children
|
|
1963
1617
|
})
|
|
@@ -2431,14 +2085,14 @@ function Collapsible({ open, id, className, children }) {
|
|
|
2431
2085
|
});
|
|
2432
2086
|
}
|
|
2433
2087
|
function StatusIcon({ status, className }) {
|
|
2434
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2088
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
2435
2089
|
name: _copilotkit_core.ɵTOOL_CALL_STATUS_ICONS[status],
|
|
2436
2090
|
"aria-hidden": "true",
|
|
2437
2091
|
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
2092
|
});
|
|
2439
2093
|
}
|
|
2440
2094
|
function Chevron({ open, className }) {
|
|
2441
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2095
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
2442
2096
|
name: "ChevronRight",
|
|
2443
2097
|
"aria-hidden": "true",
|
|
2444
2098
|
className: (0, _copilotkit_core.ɵcn)("cpk-tool-call-chevron", open && "cpk-tool-call-chevron-open", className)
|
|
@@ -3641,7 +3295,7 @@ function CopilotChatToolCallsView({ message, messages = [], display: displayProp
|
|
|
3641
3295
|
})
|
|
3642
3296
|
}, segment.id);
|
|
3643
3297
|
}
|
|
3644
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children:
|
|
3298
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: require_ProviderMarkdown.renderSlot(group, CopilotChatToolCallGroup, {
|
|
3645
3299
|
calls: segment.calls,
|
|
3646
3300
|
renderCall,
|
|
3647
3301
|
appearance: (0, _copilotkit_core.ɵtoolCallAppearance)(display) ?? "card",
|
|
@@ -3744,7 +3398,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
3744
3398
|
event.currentTarget.click();
|
|
3745
3399
|
}
|
|
3746
3400
|
},
|
|
3747
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3401
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
3748
3402
|
name: "Wrench",
|
|
3749
3403
|
"aria-hidden": "true",
|
|
3750
3404
|
className: "cpk-inspector-button-icon",
|
|
@@ -3810,7 +3464,7 @@ function CopilotChatInspectorButton({ title, className, onClick, onPointerDown,
|
|
|
3810
3464
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenuItem, {
|
|
3811
3465
|
onSelect: hideShortcuts,
|
|
3812
3466
|
className: "cpk-inspector-button-menu-item cpk-inspector-button-hide-item",
|
|
3813
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3467
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
3814
3468
|
name: "EyeOff",
|
|
3815
3469
|
"aria-hidden": "true",
|
|
3816
3470
|
className: "cpk-inspector-button-menu-item-icon"
|
|
@@ -3939,7 +3593,7 @@ function useCopyFeedback() {
|
|
|
3939
3593
|
//#region src/components/chat/CopilotChatAssistantMessage.tsx
|
|
3940
3594
|
function resolveMarkdownRenderer(value) {
|
|
3941
3595
|
if (!value) return CopilotChatAssistantMessage.MarkdownRenderer;
|
|
3942
|
-
if (
|
|
3596
|
+
if (require_ProviderMarkdown.isReactComponentType(value)) {
|
|
3943
3597
|
const ProvidedRenderer = value;
|
|
3944
3598
|
const ProvidedMarkdownRenderer = (props) => react.default.createElement(ProvidedRenderer, props);
|
|
3945
3599
|
return ProvidedMarkdownRenderer;
|
|
@@ -3978,7 +3632,7 @@ function WorkText({ messageId, children }) {
|
|
|
3978
3632
|
*/
|
|
3979
3633
|
function BoundInspectorButton({ inspectorButton, messageId, openInspector, ...props }) {
|
|
3980
3634
|
const chatConfiguration = require_chat.useCopilotChatConfiguration();
|
|
3981
|
-
return
|
|
3635
|
+
return require_ProviderMarkdown.renderSlot(inspectorButton, CopilotChatAssistantMessage.InspectorButton, {
|
|
3982
3636
|
...props,
|
|
3983
3637
|
onClick: () => openInspector({
|
|
3984
3638
|
messageId,
|
|
@@ -4028,7 +3682,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
|
|
|
4028
3682
|
onPointerEnter: () => comment.enter("pointer"),
|
|
4029
3683
|
onPointerLeave: () => comment.leave("pointer"),
|
|
4030
3684
|
className: "cpk-assistant-message-feedback-popover",
|
|
4031
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children:
|
|
3685
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: require_ProviderMarkdown.renderSlot(feedbackComment, CopilotChatAssistantMessage.FeedbackComment, {
|
|
4032
3686
|
value: comment.draft,
|
|
4033
3687
|
savedComment,
|
|
4034
3688
|
inputRef: comment.inputRef,
|
|
@@ -4041,7 +3695,7 @@ function FeedbackCommentPopover({ feedbackComment, comment, savedComment, rating
|
|
|
4041
3695
|
});
|
|
4042
3696
|
}
|
|
4043
3697
|
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 =
|
|
3698
|
+
const providerRenderer = require_accessibility.useShallowStableRef(require_ProviderMarkdown.useMarkdownRenderer());
|
|
4045
3699
|
const DefaultMarkdownRenderer = (0, react.useMemo)(() => resolveMarkdownRenderer(providerRenderer), [providerRenderer]);
|
|
4046
3700
|
const hasContent = (0, _copilotkit_core.ɵhasAssistantMessageText)(message.content);
|
|
4047
3701
|
const isLatestAssistantMessage = message.role === "assistant" && (isLatest ?? messages?.[messages.length - 1]?.id === message.id);
|
|
@@ -4075,16 +3729,16 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4075
3729
|
onKeyDown: handlers.keyDown
|
|
4076
3730
|
};
|
|
4077
3731
|
};
|
|
4078
|
-
const boundMarkdownRenderer =
|
|
3732
|
+
const boundMarkdownRenderer = require_ProviderMarkdown.renderSlot(markdownRenderer, DefaultMarkdownRenderer, {
|
|
4079
3733
|
content: message.content || "",
|
|
4080
3734
|
isStreaming: !!(isRunning && isLatestAssistantMessage),
|
|
4081
3735
|
messageId: message.id
|
|
4082
3736
|
});
|
|
4083
|
-
const boundCopyButton =
|
|
3737
|
+
const boundCopyButton = require_ProviderMarkdown.renderSlot(copyButton, CopilotChatAssistantMessage.CopyButton, { onClick: async () => {
|
|
4084
3738
|
if (message.content) return await (0, _copilotkit_shared.copyToClipboard)(message.content);
|
|
4085
3739
|
return false;
|
|
4086
3740
|
} });
|
|
4087
|
-
const boundThumbsUpButton =
|
|
3741
|
+
const boundThumbsUpButton = require_ProviderMarkdown.renderSlot(thumbsUpButton, CopilotChatAssistantMessage.ThumbsUpButton, {
|
|
4088
3742
|
onClick: onThumbsUp || feedback ? (event) => {
|
|
4089
3743
|
if (rate("up", event)) onThumbsUp?.(message);
|
|
4090
3744
|
} : void 0,
|
|
@@ -4095,15 +3749,15 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4095
3749
|
messageId: message.id,
|
|
4096
3750
|
openInspector
|
|
4097
3751
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
4098
|
-
const boundThumbsDownButton =
|
|
3752
|
+
const boundThumbsDownButton = require_ProviderMarkdown.renderSlot(thumbsDownButton, CopilotChatAssistantMessage.ThumbsDownButton, {
|
|
4099
3753
|
onClick: onThumbsDown || feedback ? (event) => {
|
|
4100
3754
|
if (rate("down", event)) onThumbsDown?.(message);
|
|
4101
3755
|
} : void 0,
|
|
4102
3756
|
...thumbFeedbackProps("down")
|
|
4103
3757
|
});
|
|
4104
|
-
const boundReadAloudButton =
|
|
4105
|
-
const boundRegenerateButton =
|
|
4106
|
-
const boundToolbar =
|
|
3758
|
+
const boundReadAloudButton = require_ProviderMarkdown.renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
|
|
3759
|
+
const boundRegenerateButton = require_ProviderMarkdown.renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
|
|
3760
|
+
const boundToolbar = require_ProviderMarkdown.renderSlot(toolbar, CopilotChatAssistantMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4107
3761
|
className: "cpk-assistant-message-toolbar-items",
|
|
4108
3762
|
children: [
|
|
4109
3763
|
boundCopyButton,
|
|
@@ -4115,7 +3769,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4115
3769
|
showInspectorShortcut && boundInspectorButton
|
|
4116
3770
|
]
|
|
4117
3771
|
}) });
|
|
4118
|
-
const boundToolCallsView =
|
|
3772
|
+
const boundToolCallsView = require_ProviderMarkdown.renderSlot(toolCallsView, CopilotChatToolCallsView, {
|
|
4119
3773
|
message,
|
|
4120
3774
|
messages
|
|
4121
3775
|
});
|
|
@@ -4192,14 +3846,14 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4192
3846
|
}
|
|
4193
3847
|
(function(_CopilotChatAssistantMessage) {
|
|
4194
3848
|
_CopilotChatAssistantMessage.MarkdownRenderer = ({ content, isStreaming, className, messageId, ...config }) => {
|
|
4195
|
-
if (
|
|
3849
|
+
if (require_accessibility.useGenerativeUIRuntime()?.transport === "markdown" && messageId !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownSurfaces.MarkdownSurfaces, {
|
|
4196
3850
|
content: content ?? "",
|
|
4197
3851
|
messageId,
|
|
4198
3852
|
isStreaming,
|
|
4199
3853
|
className,
|
|
4200
3854
|
...config
|
|
4201
3855
|
});
|
|
4202
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3856
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.StreamingMarkdownDefaultRenderer, {
|
|
4203
3857
|
content: content ?? "",
|
|
4204
3858
|
isStreaming,
|
|
4205
3859
|
className,
|
|
@@ -4249,10 +3903,10 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4249
3903
|
},
|
|
4250
3904
|
className,
|
|
4251
3905
|
...props,
|
|
4252
|
-
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3906
|
+
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4253
3907
|
name: "Check",
|
|
4254
3908
|
className: "cpk-assistant-message-toolbar-icon"
|
|
4255
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3909
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4256
3910
|
name: "Copy",
|
|
4257
3911
|
className: "cpk-assistant-message-toolbar-icon"
|
|
4258
3912
|
})
|
|
@@ -4265,7 +3919,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4265
3919
|
"data-testid": "copilot-thumbs-up-button",
|
|
4266
3920
|
title: title || labels.assistantMessageToolbarThumbsUpLabel,
|
|
4267
3921
|
...props,
|
|
4268
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3922
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4269
3923
|
name: "ThumbsUp",
|
|
4270
3924
|
className: "cpk-assistant-message-toolbar-icon",
|
|
4271
3925
|
fill: props["aria-pressed"] === true ? "currentColor" : "none"
|
|
@@ -4278,7 +3932,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4278
3932
|
"data-testid": "copilot-thumbs-down-button",
|
|
4279
3933
|
title: title || labels.assistantMessageToolbarThumbsDownLabel,
|
|
4280
3934
|
...props,
|
|
4281
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3935
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4282
3936
|
name: "ThumbsDown",
|
|
4283
3937
|
className: "cpk-assistant-message-toolbar-icon",
|
|
4284
3938
|
fill: props["aria-pressed"] === true ? "currentColor" : "none"
|
|
@@ -4316,7 +3970,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4316
3970
|
variant: "assistantMessageToolbarButton",
|
|
4317
3971
|
"aria-label": labels.assistantMessageFeedbackCommentSubmitLabel,
|
|
4318
3972
|
title: labels.assistantMessageFeedbackCommentSubmitLabel,
|
|
4319
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3973
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4320
3974
|
name: "ArrowUp",
|
|
4321
3975
|
className: "cpk-assistant-message-feedback-comment-submit-icon"
|
|
4322
3976
|
})
|
|
@@ -4329,7 +3983,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4329
3983
|
"data-testid": "copilot-read-aloud-button",
|
|
4330
3984
|
title: title || labels.assistantMessageToolbarReadAloudLabel,
|
|
4331
3985
|
...props,
|
|
4332
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3986
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4333
3987
|
name: "Volume2",
|
|
4334
3988
|
className: "cpk-assistant-message-read-aloud-icon"
|
|
4335
3989
|
})
|
|
@@ -4341,7 +3995,7 @@ function CopilotChatAssistantMessage({ message, messages, isRunning, isLatest, o
|
|
|
4341
3995
|
"data-testid": "copilot-regenerate-button",
|
|
4342
3996
|
title: title || labels.assistantMessageToolbarRegenerateLabel,
|
|
4343
3997
|
...props,
|
|
4344
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3998
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4345
3999
|
name: "RefreshCw",
|
|
4346
4000
|
className: "cpk-assistant-message-toolbar-icon"
|
|
4347
4001
|
})
|
|
@@ -4398,7 +4052,7 @@ function Lightbox({ onClose, label, children }) {
|
|
|
4398
4052
|
onClick: onClose,
|
|
4399
4053
|
className: "cpk-attachment-lightbox-close-button",
|
|
4400
4054
|
"aria-label": labels.attachmentPreviewCloseButtonLabel,
|
|
4401
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4055
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4402
4056
|
name: "X",
|
|
4403
4057
|
className: "cpk-attachment-lightbox-close-icon"
|
|
4404
4058
|
})
|
|
@@ -4537,13 +4191,13 @@ const CopilotChatAttachmentRenderer = ({ type, source, filename, className }) =>
|
|
|
4537
4191
|
function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfBranches, onSwitchToBranch, additionalToolbarItems, messageRenderer, toolbar, copyButton, editButton, branchNavigation, children, className, ...props }) {
|
|
4538
4192
|
const flattenedContent = (0, react.useMemo)(() => (0, _copilotkit_core.ɵflattenUserMessageContent)(message.content), [message.content]);
|
|
4539
4193
|
const mediaParts = (0, react.useMemo)(() => (0, _copilotkit_core.ɵgetUserMessageMediaParts)(message.content), [message.content]);
|
|
4540
|
-
const BoundMessageRenderer =
|
|
4541
|
-
const BoundCopyButton =
|
|
4194
|
+
const BoundMessageRenderer = require_ProviderMarkdown.renderSlot(messageRenderer, CopilotChatUserMessage.MessageRenderer, { content: flattenedContent });
|
|
4195
|
+
const BoundCopyButton = require_ProviderMarkdown.renderSlot(copyButton, CopilotChatUserMessage.CopyButton, { onClick: async () => {
|
|
4542
4196
|
if (flattenedContent) return await (0, _copilotkit_shared.copyToClipboard)(flattenedContent);
|
|
4543
4197
|
return false;
|
|
4544
4198
|
} });
|
|
4545
|
-
const BoundEditButton =
|
|
4546
|
-
const BoundBranchNavigation =
|
|
4199
|
+
const BoundEditButton = require_ProviderMarkdown.renderSlot(editButton, CopilotChatUserMessage.EditButton, { onClick: () => onEditMessage?.({ message }) });
|
|
4200
|
+
const BoundBranchNavigation = require_ProviderMarkdown.renderSlot(branchNavigation, CopilotChatUserMessage.BranchNavigation, {
|
|
4547
4201
|
currentBranch: branchIndex,
|
|
4548
4202
|
numberOfBranches,
|
|
4549
4203
|
onSwitchToBranch,
|
|
@@ -4554,7 +4208,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
4554
4208
|
numberOfBranches: numberOfBranches ?? 1,
|
|
4555
4209
|
canSwitch: onSwitchToBranch !== void 0
|
|
4556
4210
|
});
|
|
4557
|
-
const BoundToolbar =
|
|
4211
|
+
const BoundToolbar = require_ProviderMarkdown.renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4558
4212
|
className: "cpk-user-message-toolbar-items",
|
|
4559
4213
|
children: [
|
|
4560
4214
|
additionalToolbarItems,
|
|
@@ -4644,10 +4298,10 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
4644
4298
|
},
|
|
4645
4299
|
className,
|
|
4646
4300
|
...props,
|
|
4647
|
-
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4301
|
+
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4648
4302
|
name: "Check",
|
|
4649
4303
|
className: "cpk-user-message-toolbar-icon"
|
|
4650
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4304
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4651
4305
|
name: "Copy",
|
|
4652
4306
|
className: "cpk-user-message-toolbar-icon"
|
|
4653
4307
|
})
|
|
@@ -4660,7 +4314,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
4660
4314
|
title: title || labels.userMessageToolbarEditMessageLabel,
|
|
4661
4315
|
className,
|
|
4662
4316
|
...props,
|
|
4663
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4317
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4664
4318
|
name: "Edit",
|
|
4665
4319
|
className: "cpk-user-message-toolbar-icon"
|
|
4666
4320
|
})
|
|
@@ -4690,7 +4344,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
4690
4344
|
disabled: !canGoPrev,
|
|
4691
4345
|
className: "cpk-user-message-branch-button",
|
|
4692
4346
|
"aria-label": labels.userMessageToolbarPreviousBranchLabel,
|
|
4693
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4347
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4694
4348
|
name: "ChevronLeft",
|
|
4695
4349
|
className: "cpk-user-message-branch-icon"
|
|
4696
4350
|
})
|
|
@@ -4714,7 +4368,7 @@ function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfB
|
|
|
4714
4368
|
disabled: !canGoNext,
|
|
4715
4369
|
className: "cpk-user-message-branch-button",
|
|
4716
4370
|
"aria-label": labels.userMessageToolbarNextBranchLabel,
|
|
4717
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4371
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4718
4372
|
name: "ChevronRight",
|
|
4719
4373
|
className: "cpk-user-message-branch-icon"
|
|
4720
4374
|
})
|
|
@@ -4757,7 +4411,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
4757
4411
|
isStreaming,
|
|
4758
4412
|
elapsedSeconds: elapsed
|
|
4759
4413
|
}, labels);
|
|
4760
|
-
const boundHeader =
|
|
4414
|
+
const boundHeader = require_ProviderMarkdown.renderSlot(header, CopilotChatReasoningMessage.Header, {
|
|
4761
4415
|
isOpen,
|
|
4762
4416
|
label,
|
|
4763
4417
|
hasContent,
|
|
@@ -4765,12 +4419,12 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
4765
4419
|
elapsedSeconds: elapsed,
|
|
4766
4420
|
onClick: handleToggle
|
|
4767
4421
|
});
|
|
4768
|
-
const boundContent =
|
|
4422
|
+
const boundContent = require_ProviderMarkdown.renderSlot(contentView, CopilotChatReasoningMessage.Content, {
|
|
4769
4423
|
isStreaming,
|
|
4770
4424
|
hasContent,
|
|
4771
4425
|
children: message.content
|
|
4772
4426
|
});
|
|
4773
|
-
const boundToggle =
|
|
4427
|
+
const boundToggle = require_ProviderMarkdown.renderSlot(toggle, CopilotChatReasoningMessage.Toggle, {
|
|
4774
4428
|
isOpen,
|
|
4775
4429
|
children: boundContent
|
|
4776
4430
|
});
|
|
@@ -4811,7 +4465,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
4811
4465
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk-reasoning-message-indicator-dot" })
|
|
4812
4466
|
}),
|
|
4813
4467
|
headerChildren,
|
|
4814
|
-
isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4468
|
+
isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4815
4469
|
name: "ChevronRight",
|
|
4816
4470
|
className: (0, _copilotkit_core.ɵcn)("cpk-reasoning-message-chevron", isOpen && "cpk-reasoning-message-chevron-open")
|
|
4817
4471
|
})
|
|
@@ -4825,7 +4479,7 @@ function CopilotChatReasoningMessage({ message, messages, isRunning, isLatest: i
|
|
|
4825
4479
|
...contentProps,
|
|
4826
4480
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4827
4481
|
className: "cpk-reasoning-message-text",
|
|
4828
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4482
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.StreamingMarkdownDefaultRenderer, {
|
|
4829
4483
|
content: typeof contentChildren === "string" ? contentChildren : "",
|
|
4830
4484
|
isStreaming
|
|
4831
4485
|
}), isStreaming && hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -4868,7 +4522,7 @@ const CopilotChatSuggestionPill = react.default.forwardRef(function CopilotChatS
|
|
|
4868
4522
|
...props,
|
|
4869
4523
|
children: [isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4870
4524
|
className: "cpk-suggestion-pill-icon",
|
|
4871
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4525
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
4872
4526
|
name: "Loader2",
|
|
4873
4527
|
className: "cpk-suggestion-pill-spinner",
|
|
4874
4528
|
"aria-hidden": "true"
|
|
@@ -4900,14 +4554,14 @@ const CopilotChatSuggestionView = react.default.forwardRef(function CopilotChatS
|
|
|
4900
4554
|
if (!loadingIndexes || loadingIndexes.length === 0) return /* @__PURE__ */ new Set();
|
|
4901
4555
|
return new Set(loadingIndexes);
|
|
4902
4556
|
}, [loadingIndexes]);
|
|
4903
|
-
const ContainerElement =
|
|
4557
|
+
const ContainerElement = require_ProviderMarkdown.renderSlot(container, DefaultContainer, {
|
|
4904
4558
|
ref,
|
|
4905
4559
|
className,
|
|
4906
4560
|
...restProps
|
|
4907
4561
|
});
|
|
4908
4562
|
const suggestionElements = suggestions.map((suggestion, index) => {
|
|
4909
4563
|
const isLoading = loadingSet.has(index) || suggestion.isLoading === true;
|
|
4910
|
-
const pill =
|
|
4564
|
+
const pill = require_ProviderMarkdown.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
|
|
4911
4565
|
children: suggestion.title,
|
|
4912
4566
|
className: suggestion.className,
|
|
4913
4567
|
isLoading,
|
|
@@ -4918,7 +4572,7 @@ const CopilotChatSuggestionView = react.default.forwardRef(function CopilotChatS
|
|
|
4918
4572
|
});
|
|
4919
4573
|
const boundContainer = react.default.cloneElement(ContainerElement, void 0, suggestionElements);
|
|
4920
4574
|
if (typeof children === "function") {
|
|
4921
|
-
const sampleSuggestion =
|
|
4575
|
+
const sampleSuggestion = require_ProviderMarkdown.renderSlot(suggestionSlot, CopilotChatSuggestionPill, {
|
|
4922
4576
|
children: suggestions[0]?.title ?? "",
|
|
4923
4577
|
isLoading: suggestions.length > 0 ? loadingSet.has(0) || suggestions[0]?.isLoading === true : false,
|
|
4924
4578
|
type: "button"
|
|
@@ -5034,7 +4688,7 @@ function CopilotChatWorkSummary({ isWorking, isOpen, calls, elapsedMs, workingSi
|
|
|
5034
4688
|
className: "cpk-work-summary-failed",
|
|
5035
4689
|
children: text.failed
|
|
5036
4690
|
}),
|
|
5037
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4691
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
5038
4692
|
name: "ChevronRight",
|
|
5039
4693
|
"aria-hidden": "true",
|
|
5040
4694
|
className: (0, _copilotkit_core.ɵcn)("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
|
|
@@ -5323,7 +4977,7 @@ function IntelligenceIndicator(props) {
|
|
|
5323
4977
|
if (phase === "hidden") return null;
|
|
5324
4978
|
if (message.role !== "assistant") return null;
|
|
5325
4979
|
if (!messageHasMatchingToolCall(message)) return null;
|
|
5326
|
-
return
|
|
4980
|
+
return require_ProviderMarkdown.renderSlot(intelligenceIndicator, IntelligenceIndicatorView, {
|
|
5327
4981
|
message,
|
|
5328
4982
|
status: phase === "finished" ? "finished" : "in-progress",
|
|
5329
4983
|
label
|
|
@@ -5337,7 +4991,7 @@ function IntelligenceIndicator(props) {
|
|
|
5337
4991
|
* slot forms: a component type, a className string, or a partial-props object.
|
|
5338
4992
|
*/
|
|
5339
4993
|
function resolveSlotComponent(slot, DefaultComponent) {
|
|
5340
|
-
if (
|
|
4994
|
+
if (require_ProviderMarkdown.isReactComponentType(slot)) return {
|
|
5341
4995
|
Component: slot,
|
|
5342
4996
|
slotProps: void 0
|
|
5343
4997
|
};
|
|
@@ -5540,7 +5194,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
5540
5194
|
open: working || calls.length > 0,
|
|
5541
5195
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5542
5196
|
className: "cpk-message-view-work-summary",
|
|
5543
|
-
children:
|
|
5197
|
+
children: require_ProviderMarkdown.renderSlot(workSummary, CopilotChatWorkSummary, {
|
|
5544
5198
|
isWorking: working,
|
|
5545
5199
|
isOpen: open,
|
|
5546
5200
|
calls,
|
|
@@ -6081,7 +5735,7 @@ function CopilotChatMessageView({ messages = [], assistantMessage, userMessage,
|
|
|
6081
5735
|
pendingWorkSummary && renderWorkSummary(latestTurnKey, []),
|
|
6082
5736
|
showCursor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6083
5737
|
className: "cpk-message-view-cursor-container",
|
|
6084
|
-
children:
|
|
5738
|
+
children: require_ProviderMarkdown.renderSlot(cursor, CopilotChatMessageView.Cursor, {})
|
|
6085
5739
|
})
|
|
6086
5740
|
]
|
|
6087
5741
|
})
|
|
@@ -6204,7 +5858,7 @@ function VideoPreview({ attachment }) {
|
|
|
6204
5858
|
"aria-label": labels.attachmentPlayVideoButtonLabel,
|
|
6205
5859
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6206
5860
|
className: "cpk-attachment-queue-video-play-badge",
|
|
6207
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5861
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
6208
5862
|
name: "Play",
|
|
6209
5863
|
className: "cpk-attachment-queue-video-play-icon"
|
|
6210
5864
|
})
|
|
@@ -6400,7 +6054,7 @@ function DropOverlay() {
|
|
|
6400
6054
|
className: "cpk-chat-view-drop-overlay",
|
|
6401
6055
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6402
6056
|
className: "cpk-chat-view-drop-overlay-content",
|
|
6403
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6057
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
6404
6058
|
name: "Upload",
|
|
6405
6059
|
className: "cpk-chat-view-drop-overlay-icon"
|
|
6406
6060
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6438,12 +6092,12 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6438
6092
|
setIsResizing(state.isResizing);
|
|
6439
6093
|
});
|
|
6440
6094
|
}, [inputContainerEl]);
|
|
6441
|
-
const BoundMessageView =
|
|
6095
|
+
const BoundMessageView = require_ProviderMarkdown.renderSlot(messageView, CopilotChatMessageView, {
|
|
6442
6096
|
messages,
|
|
6443
6097
|
isRunning,
|
|
6444
6098
|
intelligenceIndicator
|
|
6445
6099
|
});
|
|
6446
|
-
const BoundInput =
|
|
6100
|
+
const BoundInput = require_ProviderMarkdown.renderSlot(input, CopilotChatInput_default, {
|
|
6447
6101
|
onSubmitMessage,
|
|
6448
6102
|
onStop,
|
|
6449
6103
|
mode: inputMode,
|
|
@@ -6470,14 +6124,14 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6470
6124
|
inputContainerHeight,
|
|
6471
6125
|
connectingIndicatorEnabled: connectingIndicator !== false
|
|
6472
6126
|
});
|
|
6473
|
-
const BoundSuggestionView = hasSuggestions ?
|
|
6127
|
+
const BoundSuggestionView = hasSuggestions ? require_ProviderMarkdown.renderSlot(suggestionView, CopilotChatSuggestionView, {
|
|
6474
6128
|
suggestions,
|
|
6475
6129
|
loadingIndexes: suggestionLoadingIndexes,
|
|
6476
6130
|
onSelectSuggestion,
|
|
6477
6131
|
className: "cpk-chat-view-suggestion-view"
|
|
6478
6132
|
}) : null;
|
|
6479
|
-
const BoundConnectingIndicator = showConnectingIndicator ?
|
|
6480
|
-
const BoundScrollView =
|
|
6133
|
+
const BoundConnectingIndicator = showConnectingIndicator ? require_ProviderMarkdown.renderSlot(typeof connectingIndicator === "boolean" ? void 0 : connectingIndicator, CopilotChatView.ConnectingIndicator, {}) : null;
|
|
6134
|
+
const BoundScrollView = require_ProviderMarkdown.renderSlot(scrollView, CopilotChatView.ScrollView, {
|
|
6481
6135
|
autoScroll,
|
|
6482
6136
|
scrollThreadId,
|
|
6483
6137
|
inputContainerHeight,
|
|
@@ -6499,7 +6153,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6499
6153
|
})
|
|
6500
6154
|
});
|
|
6501
6155
|
if (showWelcomeScreen) {
|
|
6502
|
-
const BoundInputForWelcome =
|
|
6156
|
+
const BoundInputForWelcome = require_ProviderMarkdown.renderSlot(input, CopilotChatInput_default, {
|
|
6503
6157
|
onSubmitMessage,
|
|
6504
6158
|
onStop,
|
|
6505
6159
|
mode: inputMode,
|
|
@@ -6523,7 +6177,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6523
6177
|
className: "cpk-chat-view-welcome-attachment-queue"
|
|
6524
6178
|
}), BoundInputForWelcome]
|
|
6525
6179
|
});
|
|
6526
|
-
const BoundWelcomeScreen =
|
|
6180
|
+
const BoundWelcomeScreen = require_ProviderMarkdown.renderSlot(welcomeScreenSlot, CopilotChatView.WelcomeScreen, {
|
|
6527
6181
|
input: inputWithAttachments,
|
|
6528
6182
|
suggestionView: BoundSuggestionView ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {})
|
|
6529
6183
|
});
|
|
@@ -6677,7 +6331,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6677
6331
|
previousScrollThreadId.current = scrollThreadId;
|
|
6678
6332
|
startBottomPin(true);
|
|
6679
6333
|
}, [scrollThreadId, startBottomPin]);
|
|
6680
|
-
const BoundFeather =
|
|
6334
|
+
const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
|
|
6681
6335
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
|
|
6682
6336
|
value: scrollEl,
|
|
6683
6337
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollPinnedContext.Provider, {
|
|
@@ -6698,7 +6352,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6698
6352
|
!isAtBottom && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6699
6353
|
className: "cpk-chat-view-scroll-to-bottom",
|
|
6700
6354
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
6701
|
-
children:
|
|
6355
|
+
children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => startBottomPin() })
|
|
6702
6356
|
})
|
|
6703
6357
|
] })
|
|
6704
6358
|
})
|
|
@@ -6712,7 +6366,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6712
6366
|
spacerRef,
|
|
6713
6367
|
topOffset: 16
|
|
6714
6368
|
});
|
|
6715
|
-
const BoundFeather =
|
|
6369
|
+
const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
|
|
6716
6370
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
|
|
6717
6371
|
value: nonAutoScrollEl,
|
|
6718
6372
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6740,7 +6394,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6740
6394
|
showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6741
6395
|
className: "cpk-chat-view-scroll-to-bottom",
|
|
6742
6396
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
6743
|
-
children:
|
|
6397
|
+
children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
6744
6398
|
})
|
|
6745
6399
|
]
|
|
6746
6400
|
})
|
|
@@ -6793,7 +6447,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6793
6447
|
})
|
|
6794
6448
|
});
|
|
6795
6449
|
if (mode === "none") {
|
|
6796
|
-
const BoundFeather =
|
|
6450
|
+
const BoundFeather = require_ProviderMarkdown.renderSlot(feather, CopilotChatView.Feather, {});
|
|
6797
6451
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
|
|
6798
6452
|
value: nonAutoScrollEl,
|
|
6799
6453
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6810,7 +6464,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6810
6464
|
showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6811
6465
|
className: "cpk-chat-view-scroll-to-bottom",
|
|
6812
6466
|
style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
|
|
6813
|
-
children:
|
|
6467
|
+
children: require_ProviderMarkdown.renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
|
|
6814
6468
|
})
|
|
6815
6469
|
]
|
|
6816
6470
|
})
|
|
@@ -6855,7 +6509,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6855
6509
|
className: (0, _copilotkit_core.ɵcn)("cpk-chat-view-scroll-to-bottom-button", className),
|
|
6856
6510
|
"aria-label": labels.chatScrollToBottomLabel,
|
|
6857
6511
|
...props,
|
|
6858
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6512
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
6859
6513
|
name: "ChevronDown",
|
|
6860
6514
|
className: "cpk-chat-view-scroll-to-bottom-icon"
|
|
6861
6515
|
})
|
|
@@ -6872,7 +6526,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6872
6526
|
role: "status",
|
|
6873
6527
|
className: (0, _copilotkit_core.ɵcn)("cpk-chat-view-connecting-indicator", className),
|
|
6874
6528
|
...props,
|
|
6875
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6529
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
6876
6530
|
name: "Loader2",
|
|
6877
6531
|
className: "cpk-chat-view-connecting-spinner"
|
|
6878
6532
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6890,7 +6544,7 @@ function CopilotChatView({ messageView, input, scrollView, suggestionView, welco
|
|
|
6890
6544
|
});
|
|
6891
6545
|
};
|
|
6892
6546
|
_CopilotChatView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
|
|
6893
|
-
const BoundWelcomeMessage =
|
|
6547
|
+
const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView.WelcomeMessage, {});
|
|
6894
6548
|
if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6895
6549
|
"data-copilotkit": true,
|
|
6896
6550
|
style: { display: "contents" },
|
|
@@ -7296,8 +6950,8 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
|
|
|
7296
6950
|
setTranscribeMode("input");
|
|
7297
6951
|
}, []);
|
|
7298
6952
|
const handleFinishTranscribeWithAudio = (0, react.useCallback)((audioBlob) => submitter.transcribe(audioBlob), [submitter]);
|
|
7299
|
-
const stableMessageView =
|
|
7300
|
-
const stableSuggestionView =
|
|
6953
|
+
const stableMessageView = require_accessibility.useShallowStableRef(typeof providedMessageView === "string" ? { className: providedMessageView } : providedMessageView);
|
|
6954
|
+
const stableSuggestionView = require_accessibility.useShallowStableRef(providedSuggestionView);
|
|
7301
6955
|
const handleAddFile = (0, react.useCallback)(() => {
|
|
7302
6956
|
setTimeout(() => {
|
|
7303
6957
|
fileInputRef.current?.click();
|
|
@@ -7318,7 +6972,7 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
|
|
|
7318
6972
|
const messages = (0, react.useMemo)(() => [...agent.messages], [(0, _copilotkit_core.ɵmessagesFingerprint)(agent.messages)]);
|
|
7319
6973
|
const [lastUserMessageTracker] = (0, react.useState)(() => (0, _copilotkit_core.ɵcreateLastUserMessageTracker)(messages));
|
|
7320
6974
|
const lastUserMessageState = lastUserMessageTracker.update(messages);
|
|
7321
|
-
const RenderedChatView =
|
|
6975
|
+
const RenderedChatView = require_ProviderMarkdown.renderSlot(chatView, CopilotChatView, {
|
|
7322
6976
|
...mergedProps,
|
|
7323
6977
|
messages,
|
|
7324
6978
|
onSubmitMessage: isReady ? onSubmitInput : void 0,
|
|
@@ -7400,14 +7054,14 @@ function CopilotChat({ agentId, threadId, labels, inspectorTools, chatView, isMo
|
|
|
7400
7054
|
//#endregion
|
|
7401
7055
|
//#region src/components/chat/CopilotChatToggleButton.tsx
|
|
7402
7056
|
const ICON_CLASS = "cpk-chat-toggle-button-icon";
|
|
7403
|
-
const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7057
|
+
const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
7404
7058
|
className: className ?? ICON_CLASS,
|
|
7405
7059
|
strokeWidth: 1.75,
|
|
7406
7060
|
fill: "currentColor",
|
|
7407
7061
|
...props,
|
|
7408
7062
|
name: "MessageCircle"
|
|
7409
7063
|
});
|
|
7410
|
-
const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7064
|
+
const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
7411
7065
|
className: className ?? ICON_CLASS,
|
|
7412
7066
|
strokeWidth: 1.75,
|
|
7413
7067
|
...props,
|
|
@@ -7430,12 +7084,12 @@ const CopilotChatToggleButton = react.default.forwardRef(function CopilotChatTog
|
|
|
7430
7084
|
if (event.defaultPrevented) return;
|
|
7431
7085
|
setModalOpen(!isOpen);
|
|
7432
7086
|
};
|
|
7433
|
-
const renderedOpenIcon =
|
|
7087
|
+
const renderedOpenIcon = require_ProviderMarkdown.renderSlot(openIcon, DefaultOpenIcon, {
|
|
7434
7088
|
className: ICON_CLASS,
|
|
7435
7089
|
"aria-hidden": true,
|
|
7436
7090
|
focusable: false
|
|
7437
7091
|
});
|
|
7438
|
-
const renderedCloseIcon =
|
|
7092
|
+
const renderedCloseIcon = require_ProviderMarkdown.renderSlot(closeIcon, DefaultCloseIcon, {
|
|
7439
7093
|
className: ICON_CLASS,
|
|
7440
7094
|
"aria-hidden": true,
|
|
7441
7095
|
focusable: false
|
|
@@ -7540,9 +7194,9 @@ function CopilotModalHeader({ title, titleContent, closeButton, drawerLauncher,
|
|
|
7540
7194
|
const handleToggleDrawer = (0, react.useCallback)(() => {
|
|
7541
7195
|
configuration?.setDrawerOpen?.(!configuration.drawerOpen);
|
|
7542
7196
|
}, [configuration]);
|
|
7543
|
-
const BoundTitle =
|
|
7544
|
-
const BoundCloseButton =
|
|
7545
|
-
const BoundDrawerLauncher = drawerRegistered ?
|
|
7197
|
+
const BoundTitle = require_ProviderMarkdown.renderSlot(titleContent, CopilotModalHeader.Title, { children: resolvedTitle });
|
|
7198
|
+
const BoundCloseButton = require_ProviderMarkdown.renderSlot(closeButton, CopilotModalHeader.CloseButton, { onClick: handleClose });
|
|
7199
|
+
const BoundDrawerLauncher = drawerRegistered ? require_ProviderMarkdown.renderSlot(drawerLauncher, CopilotModalHeader.DrawerLauncher, {
|
|
7546
7200
|
onClick: handleToggleDrawer,
|
|
7547
7201
|
"aria-expanded": configuration?.drawerOpen ?? false
|
|
7548
7202
|
}) : null;
|
|
@@ -7593,7 +7247,7 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
|
|
|
7593
7247
|
className: (0, _copilotkit_core.ɵcn)("cpk-modal-header-close-button", className),
|
|
7594
7248
|
"aria-label": labels.modalHeaderCloseButtonLabel,
|
|
7595
7249
|
...props,
|
|
7596
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7250
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
7597
7251
|
name: "X",
|
|
7598
7252
|
className: "cpk-modal-header-close-icon",
|
|
7599
7253
|
"aria-hidden": "true"
|
|
@@ -7608,7 +7262,7 @@ CopilotModalHeader.displayName = "CopilotModalHeader";
|
|
|
7608
7262
|
className: (0, _copilotkit_core.ɵcn)("cpk-modal-header-drawer-launcher", className),
|
|
7609
7263
|
"aria-label": labels.modalHeaderThreadsButtonLabel,
|
|
7610
7264
|
...props,
|
|
7611
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7265
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProviderMarkdown.CopilotIcon, {
|
|
7612
7266
|
name: "PanelLeftOpen",
|
|
7613
7267
|
className: "cpk-modal-header-drawer-launcher-icon",
|
|
7614
7268
|
"aria-hidden": "true"
|
|
@@ -7678,8 +7332,8 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
|
|
|
7678
7332
|
position,
|
|
7679
7333
|
widthCss
|
|
7680
7334
|
]);
|
|
7681
|
-
const headerElement =
|
|
7682
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
7335
|
+
const headerElement = require_ProviderMarkdown.renderSlot(header, CopilotModalHeader, {});
|
|
7336
|
+
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
7337
|
ref: sidebarRef,
|
|
7684
7338
|
"data-copilotkit": true,
|
|
7685
7339
|
"data-testid": "copilot-sidebar",
|
|
@@ -7707,7 +7361,7 @@ function CopilotSidebarViewInternal({ header, toggleButton, width, position = "r
|
|
|
7707
7361
|
CopilotSidebarView.displayName = "CopilotSidebarView";
|
|
7708
7362
|
(function(_CopilotSidebarView) {
|
|
7709
7363
|
_CopilotSidebarView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
|
|
7710
|
-
const BoundWelcomeMessage =
|
|
7364
|
+
const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
|
|
7711
7365
|
if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7712
7366
|
"data-copilotkit": true,
|
|
7713
7367
|
style: { display: "contents" },
|
|
@@ -7786,8 +7440,8 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
|
|
|
7786
7440
|
clickOutsideToClose,
|
|
7787
7441
|
setModalOpen
|
|
7788
7442
|
]);
|
|
7789
|
-
const headerElement = (0, react.useMemo)(() =>
|
|
7790
|
-
const toggleButtonElement = (0, react.useMemo)(() =>
|
|
7443
|
+
const headerElement = (0, react.useMemo)(() => require_ProviderMarkdown.renderSlot(header, CopilotModalHeader, {}), [header]);
|
|
7444
|
+
const toggleButtonElement = (0, react.useMemo)(() => require_ProviderMarkdown.renderSlot(toggleButton, CopilotChatToggleButton, {}), [toggleButton]);
|
|
7791
7445
|
const resolvedWidth = (0, _copilotkit_core.ɵdimensionToCss)(width, _copilotkit_core.ɵPOPUP_DEFAULT_WIDTH);
|
|
7792
7446
|
const resolvedHeight = (0, _copilotkit_core.ɵdimensionToCss)(height, _copilotkit_core.ɵPOPUP_DEFAULT_HEIGHT);
|
|
7793
7447
|
const popupStyle = (0, react.useMemo)(() => ({
|
|
@@ -7826,7 +7480,7 @@ function CopilotPopupViewInternal({ header, toggleButton, width, height, clickOu
|
|
|
7826
7480
|
CopilotPopupView.displayName = "CopilotPopupView";
|
|
7827
7481
|
(function(_CopilotPopupView) {
|
|
7828
7482
|
_CopilotPopupView.WelcomeScreen = ({ welcomeMessage, input, suggestionView, className, children, ...props }) => {
|
|
7829
|
-
const BoundWelcomeMessage =
|
|
7483
|
+
const BoundWelcomeMessage = require_ProviderMarkdown.renderSlot(welcomeMessage, CopilotChatView_default.WelcomeMessage, {});
|
|
7830
7484
|
if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7831
7485
|
"data-copilotkit": true,
|
|
7832
7486
|
style: { display: "contents" },
|
|
@@ -8746,7 +8400,7 @@ Object.defineProperty(exports, 'MEMORY_ERROR_REGISTRY', {
|
|
|
8746
8400
|
return _copilotkit_core.MEMORY_ERROR_REGISTRY;
|
|
8747
8401
|
}
|
|
8748
8402
|
});
|
|
8749
|
-
exports.MarkdownRendererProvider =
|
|
8403
|
+
exports.MarkdownRendererProvider = require_ProviderMarkdown.MarkdownRendererProvider;
|
|
8750
8404
|
Object.defineProperty(exports, 'MemoryError', {
|
|
8751
8405
|
enumerable: true,
|
|
8752
8406
|
get: function () {
|
|
@@ -9034,7 +8688,7 @@ Object.defineProperty(exports, 'StepStartedEventSchema', {
|
|
|
9034
8688
|
return _ag_ui_core_schemas.StepStartedEventSchema;
|
|
9035
8689
|
}
|
|
9036
8690
|
});
|
|
9037
|
-
exports.StreamingMarkdownDefaultRenderer =
|
|
8691
|
+
exports.StreamingMarkdownDefaultRenderer = require_ProviderMarkdown.StreamingMarkdownDefaultRenderer;
|
|
9038
8692
|
Object.defineProperty(exports, 'SubagentErrorEventSchema', {
|
|
9039
8693
|
enumerable: true,
|
|
9040
8694
|
get: function () {
|
|
@@ -9265,12 +8919,6 @@ Object.defineProperty(exports, 'WebMCPRegistry', {
|
|
|
9265
8919
|
}
|
|
9266
8920
|
});
|
|
9267
8921
|
exports.WildcardToolCallRender = WildcardToolCallRender;
|
|
9268
|
-
Object.defineProperty(exports, 'a2uiDefaultTheme', {
|
|
9269
|
-
enumerable: true,
|
|
9270
|
-
get: function () {
|
|
9271
|
-
return _copilotkit_a2ui_renderer.defaultTheme;
|
|
9272
|
-
}
|
|
9273
|
-
});
|
|
9274
8922
|
Object.defineProperty(exports, 'aggregateTokenUsage', {
|
|
9275
8923
|
enumerable: true,
|
|
9276
8924
|
get: function () {
|
|
@@ -9325,7 +8973,6 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
|
|
|
9325
8973
|
return _ag_ui_client.convertToLegacyEvents;
|
|
9326
8974
|
}
|
|
9327
8975
|
});
|
|
9328
|
-
exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
|
|
9329
8976
|
Object.defineProperty(exports, 'createActionGroup', {
|
|
9330
8977
|
enumerable: true,
|
|
9331
8978
|
get: function () {
|
|
@@ -9674,7 +9321,7 @@ Object.defineProperty(exports, 'useLicenseContext', {
|
|
|
9674
9321
|
return _copilotkit_react_core_context.useLicenseContext;
|
|
9675
9322
|
}
|
|
9676
9323
|
});
|
|
9677
|
-
exports.useMarkdownRenderer =
|
|
9324
|
+
exports.useMarkdownRenderer = require_ProviderMarkdown.useMarkdownRenderer;
|
|
9678
9325
|
exports.useMemories = useMemories;
|
|
9679
9326
|
exports.useRenderActivityMessage = useRenderActivityMessage;
|
|
9680
9327
|
exports.useRenderCustomMessages = useRenderCustomMessages;
|
|
@@ -9695,66 +9342,6 @@ Object.defineProperty(exports, 'withAuthoritativeActivityTypes', {
|
|
|
9695
9342
|
return _ag_ui_client.withAuthoritativeActivityTypes;
|
|
9696
9343
|
}
|
|
9697
9344
|
});
|
|
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
9345
|
Object.defineProperty(exports, 'ɵALL_AGENT_UPDATES', {
|
|
9759
9346
|
enumerable: true,
|
|
9760
9347
|
get: function () {
|
|
@@ -10055,12 +9642,6 @@ Object.defineProperty(exports, 'ɵPlaceholderCycler', {
|
|
|
10055
9642
|
return _copilotkit_core.ɵPlaceholderCycler;
|
|
10056
9643
|
}
|
|
10057
9644
|
});
|
|
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
9645
|
Object.defineProperty(exports, 'ɵRESIZE_SETTLE_MS', {
|
|
10065
9646
|
enumerable: true,
|
|
10066
9647
|
get: function () {
|
|
@@ -10445,24 +10026,6 @@ Object.defineProperty(exports, 'ɵdescribeUnrenderedToolCalls', {
|
|
|
10445
10026
|
return _copilotkit_core.ɵdescribeUnrenderedToolCalls;
|
|
10446
10027
|
}
|
|
10447
10028
|
});
|
|
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
10029
|
Object.defineProperty(exports, 'ɵdimensionToCss', {
|
|
10467
10030
|
enumerable: true,
|
|
10468
10031
|
get: function () {
|
|
@@ -10535,18 +10098,6 @@ Object.defineProperty(exports, 'ɵflattenUserMessageContent', {
|
|
|
10535
10098
|
return _copilotkit_core.ɵflattenUserMessageContent;
|
|
10536
10099
|
}
|
|
10537
10100
|
});
|
|
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
10101
|
Object.defineProperty(exports, 'ɵformatCountLabel', {
|
|
10551
10102
|
enumerable: true,
|
|
10552
10103
|
get: function () {
|
|
@@ -10583,24 +10134,6 @@ Object.defineProperty(exports, 'ɵformatWorkDuration', {
|
|
|
10583
10134
|
return _copilotkit_core.ɵformatWorkDuration;
|
|
10584
10135
|
}
|
|
10585
10136
|
});
|
|
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
10137
|
Object.defineProperty(exports, 'ɵgetAgentCapabilities', {
|
|
10605
10138
|
enumerable: true,
|
|
10606
10139
|
get: function () {
|
|
@@ -10775,12 +10308,6 @@ Object.defineProperty(exports, 'ɵgetWorkSummaryText', {
|
|
|
10775
10308
|
return _copilotkit_core.ɵgetWorkSummaryText;
|
|
10776
10309
|
}
|
|
10777
10310
|
});
|
|
10778
|
-
Object.defineProperty(exports, 'ɵgroupA2UIOperationsBySurface', {
|
|
10779
|
-
enumerable: true,
|
|
10780
|
-
get: function () {
|
|
10781
|
-
return _copilotkit_core.ɵgroupA2UIOperationsBySurface;
|
|
10782
|
-
}
|
|
10783
|
-
});
|
|
10784
10311
|
Object.defineProperty(exports, 'ɵhasAssistantMessageText', {
|
|
10785
10312
|
enumerable: true,
|
|
10786
10313
|
get: function () {
|
|
@@ -11075,12 +10602,6 @@ Object.defineProperty(exports, 'ɵpublicKeyHeaderDefaults', {
|
|
|
11075
10602
|
return _copilotkit_core.ɵpublicKeyHeaderDefaults;
|
|
11076
10603
|
}
|
|
11077
10604
|
});
|
|
11078
|
-
Object.defineProperty(exports, 'ɵreadA2UILifecycle', {
|
|
11079
|
-
enumerable: true,
|
|
11080
|
-
get: function () {
|
|
11081
|
-
return _copilotkit_core.ɵreadA2UILifecycle;
|
|
11082
|
-
}
|
|
11083
|
-
});
|
|
11084
10605
|
Object.defineProperty(exports, 'ɵreadKeyboardState', {
|
|
11085
10606
|
enumerable: true,
|
|
11086
10607
|
get: function () {
|
|
@@ -11129,18 +10650,6 @@ Object.defineProperty(exports, 'ɵresetMessageFeedbackCache', {
|
|
|
11129
10650
|
return _copilotkit_core.ɵresetMessageFeedbackCache;
|
|
11130
10651
|
}
|
|
11131
10652
|
});
|
|
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
10653
|
Object.defineProperty(exports, 'ɵresolveActivityRenderer', {
|
|
11145
10654
|
enumerable: true,
|
|
11146
10655
|
get: function () {
|
|
@@ -11183,6 +10692,12 @@ Object.defineProperty(exports, 'ɵresolveCustomMessageRenderers', {
|
|
|
11183
10692
|
return _copilotkit_core.ɵresolveCustomMessageRenderers;
|
|
11184
10693
|
}
|
|
11185
10694
|
});
|
|
10695
|
+
Object.defineProperty(exports, 'ɵresolveGenerativeUIDefault', {
|
|
10696
|
+
enumerable: true,
|
|
10697
|
+
get: function () {
|
|
10698
|
+
return _copilotkit_core.ɵresolveGenerativeUIDefault;
|
|
10699
|
+
}
|
|
10700
|
+
});
|
|
11186
10701
|
Object.defineProperty(exports, 'ɵresolveLicenseState', {
|
|
11187
10702
|
enumerable: true,
|
|
11188
10703
|
get: function () {
|
|
@@ -11225,12 +10740,6 @@ Object.defineProperty(exports, 'ɵrmsAmplitude', {
|
|
|
11225
10740
|
return _copilotkit_core.ɵrmsAmplitude;
|
|
11226
10741
|
}
|
|
11227
10742
|
});
|
|
11228
|
-
Object.defineProperty(exports, 'ɵrunA2UIAction', {
|
|
11229
|
-
enumerable: true,
|
|
11230
|
-
get: function () {
|
|
11231
|
-
return _copilotkit_core.ɵrunA2UIAction;
|
|
11232
|
-
}
|
|
11233
|
-
});
|
|
11234
10743
|
Object.defineProperty(exports, 'ɵrunMcpFollowUp', {
|
|
11235
10744
|
enumerable: true,
|
|
11236
10745
|
get: function () {
|
|
@@ -11411,12 +10920,6 @@ Object.defineProperty(exports, 'ɵsubscribeToMessageFeedback', {
|
|
|
11411
10920
|
return _copilotkit_core.ɵsubscribeToMessageFeedback;
|
|
11412
10921
|
}
|
|
11413
10922
|
});
|
|
11414
|
-
Object.defineProperty(exports, 'ɵsurfaceHasRenderableContent', {
|
|
11415
|
-
enumerable: true,
|
|
11416
|
-
get: function () {
|
|
11417
|
-
return _copilotkit_core.ɵsurfaceHasRenderableContent;
|
|
11418
|
-
}
|
|
11419
|
-
});
|
|
11420
10923
|
Object.defineProperty(exports, 'ɵsyncRecorderToMode', {
|
|
11421
10924
|
enumerable: true,
|
|
11422
10925
|
get: function () {
|
|
@@ -11429,12 +10932,6 @@ Object.defineProperty(exports, 'ɵthreadAdapterEvents', {
|
|
|
11429
10932
|
return _copilotkit_core.ɵthreadAdapterEvents;
|
|
11430
10933
|
}
|
|
11431
10934
|
});
|
|
11432
|
-
Object.defineProperty(exports, 'ɵtoA2UIClientEvent', {
|
|
11433
|
-
enumerable: true,
|
|
11434
|
-
get: function () {
|
|
11435
|
-
return _copilotkit_core.ɵtoA2UIClientEvent;
|
|
11436
|
-
}
|
|
11437
|
-
});
|
|
11438
10935
|
Object.defineProperty(exports, 'ɵtoDefaultToolCallStatus', {
|
|
11439
10936
|
enumerable: true,
|
|
11440
10937
|
get: function () {
|