@copilotkit/react-core 2.0.0-rc.18 → 2.0.0-rc.19
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/{MarkdownSurfaces-ChOKawIN.cjs → MarkdownSurfaces-Ci0E7XKw.cjs} +2 -1
- package/dist/MarkdownSurfaces-Ci0E7XKw.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-DAEqIF5v.mjs → MarkdownSurfaces-kfFfyx5V.mjs} +2 -1
- package/dist/MarkdownSurfaces-kfFfyx5V.mjs.map +1 -0
- package/dist/context.cjs +2 -3
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.mts.map +1 -1
- package/dist/context.mjs +2 -3
- package/dist/context.mjs.map +1 -1
- package/dist/generative-ui.cjs +2 -1
- package/dist/generative-ui.cjs.map +1 -1
- package/dist/generative-ui.mjs +2 -1
- package/dist/generative-ui.mjs.map +1 -1
- package/dist/headless.d.cts.map +1 -1
- package/dist/index.cjs +31 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +31 -13
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +31 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/MarkdownSurfaces-ChOKawIN.cjs.map +0 -1
- package/dist/MarkdownSurfaces-DAEqIF5v.mjs.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -275,8 +275,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
275
275
|
}
|
|
276
276
|
_notifyRenderToolCallsChanged() {
|
|
277
277
|
this.notifySubscribers((subscriber) => {
|
|
278
|
-
|
|
279
|
-
if (reactSubscriber.onRenderToolCallsChanged) reactSubscriber.onRenderToolCallsChanged({
|
|
278
|
+
return subscriber.onRenderToolCallsChanged?.({
|
|
280
279
|
copilotkit: this,
|
|
281
280
|
renderToolCalls: this.renderToolCalls
|
|
282
281
|
});
|
|
@@ -288,7 +287,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
288
287
|
setInterruptElement(element) {
|
|
289
288
|
this._interruptElement = element;
|
|
290
289
|
this.notifySubscribers((subscriber) => {
|
|
291
|
-
subscriber.onInterruptElementChanged?.({
|
|
290
|
+
return subscriber.onInterruptElementChanged?.({
|
|
292
291
|
copilotkit: this,
|
|
293
292
|
interruptElement: this._interruptElement
|
|
294
293
|
});
|
|
@@ -1924,7 +1923,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
1924
1923
|
|
|
1925
1924
|
//#endregion
|
|
1926
1925
|
//#region package.json
|
|
1927
|
-
var version$1 = "2.0.0-rc.
|
|
1926
|
+
var version$1 = "2.0.0-rc.19";
|
|
1928
1927
|
|
|
1929
1928
|
//#endregion
|
|
1930
1929
|
//#region src/components/CopilotKitInspector.tsx
|
|
@@ -3794,6 +3793,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
3794
3793
|
case "m": return pad(date.getMinutes(), 2);
|
|
3795
3794
|
case "s": return pad(date.getSeconds(), 2);
|
|
3796
3795
|
case "a": return date.getHours() < 12 ? "AM" : "PM";
|
|
3796
|
+
case void 0:
|
|
3797
3797
|
default: return token;
|
|
3798
3798
|
}
|
|
3799
3799
|
});
|
|
@@ -10751,8 +10751,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
10751
10751
|
console.error("[CopilotKit] Paste error:", error);
|
|
10752
10752
|
}
|
|
10753
10753
|
};
|
|
10754
|
-
|
|
10755
|
-
|
|
10754
|
+
const onPaste = (e) => {
|
|
10755
|
+
handlePaste(e);
|
|
10756
|
+
};
|
|
10757
|
+
document.addEventListener("paste", onPaste);
|
|
10758
|
+
return () => document.removeEventListener("paste", onPaste);
|
|
10756
10759
|
}, [enabled, processFiles]);
|
|
10757
10760
|
return {
|
|
10758
10761
|
attachments,
|
|
@@ -11998,7 +12001,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
11998
12001
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
|
|
11999
12002
|
"data-testid": "copilot-copy-button",
|
|
12000
12003
|
title: title || labels.assistantMessageToolbarCopyMessageLabel,
|
|
12001
|
-
onClick:
|
|
12004
|
+
onClick: (event) => {
|
|
12005
|
+
handleClick(event);
|
|
12006
|
+
},
|
|
12002
12007
|
className,
|
|
12003
12008
|
...props,
|
|
12004
12009
|
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotIcon, {
|
|
@@ -12410,7 +12415,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
12410
12415
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
|
|
12411
12416
|
"data-testid": "copilot-user-copy-button",
|
|
12412
12417
|
title: title || labels.userMessageToolbarCopyMessageLabel,
|
|
12413
|
-
onClick:
|
|
12418
|
+
onClick: (event) => {
|
|
12419
|
+
handleClick(event);
|
|
12420
|
+
},
|
|
12414
12421
|
className,
|
|
12415
12422
|
...props,
|
|
12416
12423
|
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotIcon, {
|
|
@@ -15434,6 +15441,18 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
15434
15441
|
hasNativeIntelligenceRunActivity,
|
|
15435
15442
|
rememberRecentlyLocalRunId
|
|
15436
15443
|
]);
|
|
15444
|
+
const submitMessage = (0, react.useCallback)((value) => {
|
|
15445
|
+
onSubmitInput(value);
|
|
15446
|
+
}, [onSubmitInput]);
|
|
15447
|
+
const selectSuggestion = (0, react.useCallback)((suggestion) => {
|
|
15448
|
+
handleSelectSuggestion(suggestion);
|
|
15449
|
+
}, [handleSelectSuggestion]);
|
|
15450
|
+
const dropFiles = (0, react.useCallback)((e) => {
|
|
15451
|
+
handleDrop(e);
|
|
15452
|
+
}, [handleDrop]);
|
|
15453
|
+
const uploadFiles = (0, react.useCallback)((e) => {
|
|
15454
|
+
handleFileUpload(e);
|
|
15455
|
+
}, [handleFileUpload]);
|
|
15437
15456
|
const stopCurrentRun = (0, react.useCallback)(() => {
|
|
15438
15457
|
try {
|
|
15439
15458
|
copilotkit.stopAgent({ agent });
|
|
@@ -15495,7 +15514,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
15495
15514
|
const mergedProps = {
|
|
15496
15515
|
isRunning: agent.isRunning,
|
|
15497
15516
|
suggestions: isReady ? autoSuggestions : [],
|
|
15498
|
-
onSelectSuggestion: isReady ?
|
|
15517
|
+
onSelectSuggestion: isReady ? selectSuggestion : void 0,
|
|
15499
15518
|
suggestionView: stableSuggestionView,
|
|
15500
15519
|
...restProps
|
|
15501
15520
|
};
|
|
@@ -15527,7 +15546,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
15527
15546
|
const RenderedChatView = renderSlot(chatView, CopilotChatView, {
|
|
15528
15547
|
...mergedProps,
|
|
15529
15548
|
messages,
|
|
15530
|
-
onSubmitMessage: isReady ?
|
|
15549
|
+
onSubmitMessage: isReady ? submitMessage : void 0,
|
|
15531
15550
|
onStop: effectiveStopHandler,
|
|
15532
15551
|
inputMode: effectiveMode,
|
|
15533
15552
|
inputValue,
|
|
@@ -15542,7 +15561,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
15542
15561
|
dragOver,
|
|
15543
15562
|
onDragOver: handleDragOver,
|
|
15544
15563
|
onDragLeave: handleDragLeave,
|
|
15545
|
-
onDrop:
|
|
15564
|
+
onDrop: dropFiles,
|
|
15546
15565
|
isConnecting,
|
|
15547
15566
|
hasExplicitThreadId
|
|
15548
15567
|
});
|
|
@@ -15561,7 +15580,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
|
15561
15580
|
type: "file",
|
|
15562
15581
|
multiple: true,
|
|
15563
15582
|
ref: fileInputRef,
|
|
15564
|
-
onChange:
|
|
15583
|
+
onChange: uploadFiles,
|
|
15565
15584
|
accept: attachmentsConfig?.accept ?? "*/*",
|
|
15566
15585
|
style: { display: "none" }
|
|
15567
15586
|
}),
|