@copilotkit/react-ui 1.8.14-next.0 → 1.8.14-next.1
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 +9 -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-BNTE4N7G.mjs";
|
|
4
|
+
import "../../chunk-C3GSYRC3.mjs";
|
|
5
5
|
import "../../chunk-UH2UFL5W.mjs";
|
|
6
6
|
import "../../chunk-V7W6IM2V.mjs";
|
|
7
7
|
import "../../chunk-VGPQYMKJ.mjs";
|
|
@@ -398,6 +398,7 @@ var ChatContextProvider = ({
|
|
|
398
398
|
// src/components/chat/Window.tsx
|
|
399
399
|
var import_react2 = __toESM(require("react"));
|
|
400
400
|
var import_react_core = require("@copilotkit/react-core");
|
|
401
|
+
var import_shared = require("@copilotkit/shared");
|
|
401
402
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
402
403
|
var Window = ({
|
|
403
404
|
children,
|
|
@@ -434,7 +435,7 @@ var Window = ({
|
|
|
434
435
|
const isDescendantOfWrapper = (_a = windowRef.current) == null ? void 0 : _a.contains(target);
|
|
435
436
|
if (open && event.key === "Escape" && (!isInput || isDescendantOfWrapper) && hitEscapeToClose) {
|
|
436
437
|
setOpen(false);
|
|
437
|
-
} else if (event.key === shortcut && (isMacOS() && event.metaKey || !isMacOS() && event.ctrlKey) && (!isInput || isDescendantOfWrapper)) {
|
|
438
|
+
} else if (event.key === shortcut && ((0, import_shared.isMacOS)() && event.metaKey || !(0, import_shared.isMacOS)() && event.ctrlKey) && (!isInput || isDescendantOfWrapper)) {
|
|
438
439
|
setOpen(!open);
|
|
439
440
|
}
|
|
440
441
|
},
|
|
@@ -503,9 +504,6 @@ var preventScroll = (event) => {
|
|
|
503
504
|
event.preventDefault();
|
|
504
505
|
}
|
|
505
506
|
};
|
|
506
|
-
function isMacOS() {
|
|
507
|
-
return /Mac|iMac|Macintosh/i.test(navigator.userAgent);
|
|
508
|
-
}
|
|
509
507
|
|
|
510
508
|
// src/components/chat/Button.tsx
|
|
511
509
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -734,7 +732,7 @@ var CheckIcon2 = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
|
734
732
|
|
|
735
733
|
// src/components/dev-console/console.tsx
|
|
736
734
|
var import_react5 = require("@headlessui/react");
|
|
737
|
-
var
|
|
735
|
+
var import_shared2 = require("@copilotkit/shared");
|
|
738
736
|
|
|
739
737
|
// src/components/help-modal/modal.tsx
|
|
740
738
|
var import_react3 = require("react");
|
|
@@ -846,7 +844,7 @@ function CopilotKitHelpModal() {
|
|
|
846
844
|
// src/components/dev-console/console.tsx
|
|
847
845
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
848
846
|
function CopilotDevConsole() {
|
|
849
|
-
const currentVersion =
|
|
847
|
+
const currentVersion = import_shared2.COPILOTKIT_VERSION;
|
|
850
848
|
const context = (0, import_react_core3.useCopilotContext)();
|
|
851
849
|
const [showDevConsole, setShowDevConsole] = (0, import_react4.useState)(false);
|
|
852
850
|
(0, import_react4.useEffect)(() => {
|
|
@@ -2492,7 +2490,7 @@ var import_react_core10 = require("@copilotkit/react-core");
|
|
|
2492
2490
|
|
|
2493
2491
|
// src/components/chat/Suggestion.tsx
|
|
2494
2492
|
var import_react_core9 = require("@copilotkit/react-core");
|
|
2495
|
-
var
|
|
2493
|
+
var import_shared3 = require("@copilotkit/shared");
|
|
2496
2494
|
var import_runtime_client_gql3 = require("@copilotkit/runtime-client-gql");
|
|
2497
2495
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2498
2496
|
function Suggestion({ title, onClick, partial, className }) {
|
|
@@ -2516,7 +2514,7 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
2516
2514
|
Object.values(context.actions).map((action) => ({
|
|
2517
2515
|
name: action.name,
|
|
2518
2516
|
description: action.description,
|
|
2519
|
-
jsonSchema: JSON.stringify((0,
|
|
2517
|
+
jsonSchema: JSON.stringify((0, import_shared3.actionParametersToJsonSchema)(action.parameters))
|
|
2520
2518
|
}))
|
|
2521
2519
|
);
|
|
2522
2520
|
const allSuggestions = [];
|
|
@@ -2582,7 +2580,7 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
2582
2580
|
|
|
2583
2581
|
// src/components/chat/Chat.tsx
|
|
2584
2582
|
var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
|
|
2585
|
-
var
|
|
2583
|
+
var import_shared4 = require("@copilotkit/shared");
|
|
2586
2584
|
var import_react_core11 = require("@copilotkit/react-core");
|
|
2587
2585
|
|
|
2588
2586
|
// src/components/chat/ImageUploadQueue.tsx
|
|
@@ -2919,7 +2917,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
|
|
|
2919
2917
|
runChatCompletion,
|
|
2920
2918
|
isLoading
|
|
2921
2919
|
} = (0, import_react_core10.useCopilotChat)({
|
|
2922
|
-
id: (0,
|
|
2920
|
+
id: (0, import_shared4.randomId)(),
|
|
2923
2921
|
makeSystemMessage
|
|
2924
2922
|
});
|
|
2925
2923
|
const [currentSuggestions, setCurrentSuggestions] = (0, import_react13.useState)([]);
|