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