@copilotkit/react-ui 1.3.6 → 1.3.7-fix-chat-interactions-rerenders.0
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 +10 -0
- package/dist/{chunk-VOBX4JOA.mjs → chunk-5DT3MDBZ.mjs} +7 -4
- package/dist/chunk-5DT3MDBZ.mjs.map +1 -0
- package/dist/{chunk-P47XGGRX.mjs → chunk-CPWFYV3U.mjs} +2 -2
- package/dist/{chunk-H7TM5JE6.mjs → chunk-CTPEKUNX.mjs} +4 -2
- package/dist/chunk-CTPEKUNX.mjs.map +1 -0
- package/dist/{chunk-SPZEI5EN.mjs → chunk-FUCEBN2P.mjs} +3 -3
- package/dist/{chunk-U6J5DGOE.mjs → chunk-HBZPOT37.mjs} +2 -2
- package/dist/{chunk-WCPLXRZX.mjs → chunk-KFQYJ5R5.mjs} +1 -1
- package/dist/chunk-KFQYJ5R5.mjs.map +1 -0
- package/dist/{chunk-HIX4HRWU.mjs → chunk-LGS6B47Q.mjs} +14 -7
- package/dist/chunk-LGS6B47Q.mjs.map +1 -0
- package/dist/{chunk-TSQVQAAC.mjs → chunk-PJNNEX4L.mjs} +2 -2
- package/dist/{chunk-LT5YTQ4F.mjs → chunk-QI3OM75G.mjs} +12 -4
- package/dist/chunk-QI3OM75G.mjs.map +1 -0
- package/dist/components/chat/Chat.js +15 -3
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +6 -6
- package/dist/components/chat/Input.js +17 -1
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +2 -2
- package/dist/components/chat/Modal.js +15 -3
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +7 -7
- package/dist/components/chat/Popup.js +15 -3
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +8 -8
- package/dist/components/chat/Sidebar.js +15 -3
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +8 -8
- package/dist/components/chat/Suggestion.d.ts +2 -2
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +1 -1
- package/dist/components/chat/index.js +15 -3
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +9 -9
- package/dist/components/dev-console/console.js +9 -1
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +2 -2
- package/dist/components/dev-console/index.js +9 -1
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +2 -2
- package/dist/components/dev-console/utils.d.ts +2 -2
- package/dist/components/dev-console/utils.js.map +1 -1
- package/dist/components/dev-console/utils.mjs +1 -1
- package/dist/components/index.js +15 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -9
- package/dist/hooks/use-push-to-talk.js +17 -1
- package/dist/hooks/use-push-to-talk.js.map +1 -1
- package/dist/hooks/use-push-to-talk.mjs +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/package.json +7 -7
- package/src/components/chat/Chat.tsx +9 -2
- package/src/components/chat/Suggestion.tsx +2 -2
- package/src/components/dev-console/console.tsx +6 -2
- package/src/components/dev-console/utils.ts +6 -2
- package/src/hooks/use-push-to-talk.tsx +4 -2
- package/dist/chunk-H7TM5JE6.mjs.map +0 -1
- package/dist/chunk-HIX4HRWU.mjs.map +0 -1
- package/dist/chunk-LT5YTQ4F.mjs.map +0 -1
- package/dist/chunk-VOBX4JOA.mjs.map +0 -1
- package/dist/chunk-WCPLXRZX.mjs.map +0 -1
- /package/dist/{chunk-P47XGGRX.mjs.map → chunk-CPWFYV3U.mjs.map} +0 -0
- /package/dist/{chunk-SPZEI5EN.mjs.map → chunk-FUCEBN2P.mjs.map} +0 -0
- /package/dist/{chunk-U6J5DGOE.mjs.map → chunk-HBZPOT37.mjs.map} +0 -0
- /package/dist/{chunk-TSQVQAAC.mjs.map → chunk-PJNNEX4L.mjs.map} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-FUCEBN2P.mjs";
|
|
4
4
|
import "../../chunk-FO7Z5LAL.mjs";
|
|
5
5
|
import "../../chunk-FLV3J3VX.mjs";
|
|
6
6
|
import "../../chunk-YOH25I6N.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-LGS6B47Q.mjs";
|
|
8
8
|
import "../../chunk-V7W6IM2V.mjs";
|
|
9
9
|
import "../../chunk-YH2STM73.mjs";
|
|
10
10
|
import "../../chunk-RF3KLUPD.mjs";
|
|
11
11
|
import "../../chunk-GOTHQ665.mjs";
|
|
12
12
|
import "../../chunk-MA5B5ELM.mjs";
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-KFQYJ5R5.mjs";
|
|
14
|
+
import "../../chunk-QI3OM75G.mjs";
|
|
15
|
+
import "../../chunk-CTPEKUNX.mjs";
|
|
16
16
|
import "../../chunk-OTPAZXVR.mjs";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-HBZPOT37.mjs";
|
|
18
18
|
import "../../chunk-YQFVRDNC.mjs";
|
|
19
19
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
20
20
|
import "../../chunk-GDNJRSD4.mjs";
|
|
@@ -23,7 +23,7 @@ import "../../chunk-BJPGMY3I.mjs";
|
|
|
23
23
|
import "../../chunk-UPTB2MVO.mjs";
|
|
24
24
|
import "../../chunk-FZC7X5PK.mjs";
|
|
25
25
|
import "../../chunk-54JAUBUJ.mjs";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-5DT3MDBZ.mjs";
|
|
27
27
|
import "../../chunk-MRXNTQOX.mjs";
|
|
28
28
|
export {
|
|
29
29
|
CopilotModal
|
|
@@ -735,7 +735,9 @@ var usePushToTalk = ({
|
|
|
735
735
|
const audioContextRef = (0, import_react5.useRef)(null);
|
|
736
736
|
const mediaRecorderRef = (0, import_react5.useRef)(null);
|
|
737
737
|
const recordedChunks = (0, import_react5.useRef)([]);
|
|
738
|
-
const
|
|
738
|
+
const generalContext = (0, import_react_core.useCopilotContext)();
|
|
739
|
+
const messagesContext = (0, import_react_core.useCopilotMessagesContext)();
|
|
740
|
+
const context = __spreadValues(__spreadValues({}, generalContext), messagesContext);
|
|
739
741
|
const [startReadingFromMessageId, setStartReadingFromMessageId] = (0, import_react5.useState)(null);
|
|
740
742
|
(0, import_react5.useEffect)(() => {
|
|
741
743
|
if (pushToTalkState === "recording") {
|
|
@@ -1971,6 +1973,7 @@ function DebugMenuButton({
|
|
|
1971
1973
|
mode
|
|
1972
1974
|
}) {
|
|
1973
1975
|
const context = (0, import_react_core7.useCopilotContext)();
|
|
1976
|
+
const messagesContext = (0, import_react_core7.useCopilotMessagesContext)();
|
|
1974
1977
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-black top-24 w-52 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react10.Menu, { children: [
|
|
1975
1978
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuButton, { className: `copilotKitDebugMenuButton ${mode === "compact" ? "compact" : ""}`, children: mode == "compact" ? "Debug" : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1976
1979
|
"Debug ",
|
|
@@ -1986,7 +1989,14 @@ function DebugMenuButton({
|
|
|
1986
1989
|
children: [
|
|
1987
1990
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logReadables(context), children: "Log Readables" }) }),
|
|
1988
1991
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logActions(context), children: "Log Actions" }) }),
|
|
1989
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1993
|
+
"button",
|
|
1994
|
+
{
|
|
1995
|
+
className: "copilotKitDebugMenuItem",
|
|
1996
|
+
onClick: () => logMessages(messagesContext),
|
|
1997
|
+
children: "Log Messages"
|
|
1998
|
+
}
|
|
1999
|
+
) }),
|
|
1990
2000
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => checkForUpdates(true), children: "Check for Updates" }) }),
|
|
1991
2001
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("hr", {}),
|
|
1992
2002
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => setShowDevConsole(false), children: "Hide Dev Console" }) })
|
|
@@ -2095,7 +2105,9 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
|
|
|
2095
2105
|
(_a = suggestionsAbortControllerRef.current) == null ? void 0 : _a.abort();
|
|
2096
2106
|
suggestionsAbortControllerRef.current = null;
|
|
2097
2107
|
};
|
|
2098
|
-
const
|
|
2108
|
+
const generalContext = (0, import_react_core8.useCopilotContext)();
|
|
2109
|
+
const messagesContext = (0, import_react_core8.useCopilotMessagesContext)();
|
|
2110
|
+
const context = __spreadValues(__spreadValues({}, generalContext), messagesContext);
|
|
2099
2111
|
(0, import_react11.useEffect)(() => {
|
|
2100
2112
|
onInProgress == null ? void 0 : onInProgress(isLoading);
|
|
2101
2113
|
abortSuggestions();
|