@copilotkit/react-ui 1.8.14-next.0 → 1.8.14-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{chunk-FWKHST6I.mjs → chunk-BNTE4N7G.mjs} +2 -2
- package/dist/{chunk-TIDV74OE.mjs → chunk-C3GSYRC3.mjs} +2 -4
- package/dist/chunk-C3GSYRC3.mjs.map +1 -0
- package/dist/{chunk-QEZ3YYLO.mjs → chunk-MG26A5JB.mjs} +2 -2
- package/dist/{chunk-JU3HNL5N.mjs → chunk-RMX44BOI.mjs} +2 -2
- package/dist/components/chat/Modal.js +8 -10
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +2 -2
- package/dist/components/chat/Popup.js +8 -10
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +3 -3
- package/dist/components/chat/Sidebar.js +8 -10
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +3 -3
- package/dist/components/chat/Window.js +2 -4
- package/dist/components/chat/Window.js.map +1 -1
- package/dist/components/chat/Window.mjs +1 -1
- package/dist/components/chat/index.js +8 -10
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +4 -4
- package/dist/components/index.js +8 -10
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/package.json +4 -4
- package/src/components/chat/Window.tsx +1 -4
- package/dist/chunk-TIDV74OE.mjs.map +0 -1
- /package/dist/{chunk-FWKHST6I.mjs.map → chunk-BNTE4N7G.mjs.map} +0 -0
- /package/dist/{chunk-QEZ3YYLO.mjs.map → chunk-MG26A5JB.mjs.map} +0 -0
- /package/dist/{chunk-JU3HNL5N.mjs.map → chunk-RMX44BOI.mjs.map} +0 -0
|
@@ -2,12 +2,12 @@ import "../../chunk-SC6JRFAJ.mjs";
|
|
|
2
2
|
import "../../chunk-WB3YULQ4.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotPopup
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-MG26A5JB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
CopilotSidebar
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-RMX44BOI.mjs";
|
|
9
|
+
import "../../chunk-BNTE4N7G.mjs";
|
|
10
|
+
import "../../chunk-C3GSYRC3.mjs";
|
|
11
11
|
import "../../chunk-UH2UFL5W.mjs";
|
|
12
12
|
import "../../chunk-V7W6IM2V.mjs";
|
|
13
13
|
import "../../chunk-VGPQYMKJ.mjs";
|
package/dist/components/index.js
CHANGED
|
@@ -409,6 +409,7 @@ var ChatContextProvider = ({
|
|
|
409
409
|
// src/components/chat/Window.tsx
|
|
410
410
|
var import_react2 = __toESM(require("react"));
|
|
411
411
|
var import_react_core = require("@copilotkit/react-core");
|
|
412
|
+
var import_shared = require("@copilotkit/shared");
|
|
412
413
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
413
414
|
var Window = ({
|
|
414
415
|
children,
|
|
@@ -445,7 +446,7 @@ var Window = ({
|
|
|
445
446
|
const isDescendantOfWrapper = (_a = windowRef.current) == null ? void 0 : _a.contains(target);
|
|
446
447
|
if (open && event.key === "Escape" && (!isInput || isDescendantOfWrapper) && hitEscapeToClose) {
|
|
447
448
|
setOpen(false);
|
|
448
|
-
} else if (event.key === shortcut && (isMacOS() && event.metaKey || !isMacOS() && event.ctrlKey) && (!isInput || isDescendantOfWrapper)) {
|
|
449
|
+
} else if (event.key === shortcut && ((0, import_shared.isMacOS)() && event.metaKey || !(0, import_shared.isMacOS)() && event.ctrlKey) && (!isInput || isDescendantOfWrapper)) {
|
|
449
450
|
setOpen(!open);
|
|
450
451
|
}
|
|
451
452
|
},
|
|
@@ -514,9 +515,6 @@ var preventScroll = (event) => {
|
|
|
514
515
|
event.preventDefault();
|
|
515
516
|
}
|
|
516
517
|
};
|
|
517
|
-
function isMacOS() {
|
|
518
|
-
return /Mac|iMac|Macintosh/i.test(navigator.userAgent);
|
|
519
|
-
}
|
|
520
518
|
|
|
521
519
|
// src/components/chat/Button.tsx
|
|
522
520
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -745,7 +743,7 @@ var CheckIcon2 = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
|
745
743
|
|
|
746
744
|
// src/components/dev-console/console.tsx
|
|
747
745
|
var import_react5 = require("@headlessui/react");
|
|
748
|
-
var
|
|
746
|
+
var import_shared2 = require("@copilotkit/shared");
|
|
749
747
|
|
|
750
748
|
// src/components/help-modal/modal.tsx
|
|
751
749
|
var import_react3 = require("react");
|
|
@@ -857,7 +855,7 @@ function CopilotKitHelpModal() {
|
|
|
857
855
|
// src/components/dev-console/console.tsx
|
|
858
856
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
859
857
|
function CopilotDevConsole() {
|
|
860
|
-
const currentVersion =
|
|
858
|
+
const currentVersion = import_shared2.COPILOTKIT_VERSION;
|
|
861
859
|
const context = (0, import_react_core3.useCopilotContext)();
|
|
862
860
|
const [showDevConsole, setShowDevConsole] = (0, import_react4.useState)(false);
|
|
863
861
|
(0, import_react4.useEffect)(() => {
|
|
@@ -2503,7 +2501,7 @@ var import_react_core10 = require("@copilotkit/react-core");
|
|
|
2503
2501
|
|
|
2504
2502
|
// src/components/chat/Suggestion.tsx
|
|
2505
2503
|
var import_react_core9 = require("@copilotkit/react-core");
|
|
2506
|
-
var
|
|
2504
|
+
var import_shared3 = require("@copilotkit/shared");
|
|
2507
2505
|
var import_runtime_client_gql3 = require("@copilotkit/runtime-client-gql");
|
|
2508
2506
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2509
2507
|
function Suggestion({ title, onClick, partial, className }) {
|
|
@@ -2527,7 +2525,7 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
2527
2525
|
Object.values(context.actions).map((action) => ({
|
|
2528
2526
|
name: action.name,
|
|
2529
2527
|
description: action.description,
|
|
2530
|
-
jsonSchema: JSON.stringify((0,
|
|
2528
|
+
jsonSchema: JSON.stringify((0, import_shared3.actionParametersToJsonSchema)(action.parameters))
|
|
2531
2529
|
}))
|
|
2532
2530
|
);
|
|
2533
2531
|
const allSuggestions = [];
|
|
@@ -2593,7 +2591,7 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
2593
2591
|
|
|
2594
2592
|
// src/components/chat/Chat.tsx
|
|
2595
2593
|
var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
|
|
2596
|
-
var
|
|
2594
|
+
var import_shared4 = require("@copilotkit/shared");
|
|
2597
2595
|
var import_react_core11 = require("@copilotkit/react-core");
|
|
2598
2596
|
|
|
2599
2597
|
// src/components/chat/ImageUploadQueue.tsx
|
|
@@ -2930,7 +2928,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
|
|
|
2930
2928
|
runChatCompletion,
|
|
2931
2929
|
isLoading
|
|
2932
2930
|
} = (0, import_react_core10.useCopilotChat)({
|
|
2933
|
-
id: (0,
|
|
2931
|
+
id: (0, import_shared4.randomId)(),
|
|
2934
2932
|
makeSystemMessage
|
|
2935
2933
|
});
|
|
2936
2934
|
const [currentSuggestions, setCurrentSuggestions] = (0, import_react13.useState)([]);
|