@copilotkit/react-ui 1.3.7 → 1.3.8-fix-memoize-chat-ui-context.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-7YQICPBC.mjs → chunk-3KBQXU44.mjs} +9 -9
- package/dist/{chunk-XSUSSWDS.mjs → chunk-3XAXY2Z3.mjs} +2 -2
- package/dist/{chunk-6VYMULPK.mjs → chunk-47OPG5FM.mjs} +9 -9
- package/dist/{chunk-RWT7WRG2.mjs → chunk-6BL5C56L.mjs} +2 -2
- package/dist/{chunk-DP5YVGNX.mjs → chunk-6INMITFA.mjs} +2 -2
- package/dist/{chunk-BJPGMY3I.mjs → chunk-CBBFRI3Q.mjs} +19 -8
- package/dist/{chunk-BJPGMY3I.mjs.map → chunk-CBBFRI3Q.mjs.map} +1 -1
- package/dist/{chunk-SHTMRY45.mjs → chunk-CPMIEVKK.mjs} +2 -2
- package/dist/{chunk-BNCTYKEP.mjs → chunk-JTINVYPK.mjs} +2 -2
- package/dist/{chunk-TYYJR3LE.mjs → chunk-KCAVDFB6.mjs} +2 -2
- package/dist/{chunk-YOH25I6N.mjs → chunk-RQNJNK2W.mjs} +2 -2
- package/dist/{chunk-JQOSF44H.mjs → chunk-SWADR6EH.mjs} +2 -2
- package/dist/{chunk-FLV3J3VX.mjs → chunk-VEC45H6Q.mjs} +2 -2
- package/dist/{chunk-WHSD7DBC.mjs → chunk-WYMTXCQU.mjs} +2 -2
- package/dist/{chunk-FO7Z5LAL.mjs → chunk-YAGE7RCE.mjs} +2 -2
- package/dist/{chunk-AAY3WWWC.mjs → chunk-ZABXREBH.mjs} +2 -2
- package/dist/components/chat/Button.js.map +1 -1
- package/dist/components/chat/Button.mjs +2 -2
- package/dist/components/chat/Chat.js +17 -6
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +9 -9
- package/dist/components/chat/ChatContext.js +17 -6
- package/dist/components/chat/ChatContext.js.map +1 -1
- package/dist/components/chat/ChatContext.mjs +1 -1
- package/dist/components/chat/Header.js.map +1 -1
- package/dist/components/chat/Header.mjs +2 -2
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +2 -2
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +2 -2
- package/dist/components/chat/Modal.js +17 -6
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +13 -13
- package/dist/components/chat/Popup.js +17 -6
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +14 -14
- package/dist/components/chat/Response.js.map +1 -1
- package/dist/components/chat/Response.mjs +2 -2
- package/dist/components/chat/Sidebar.js +17 -6
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +14 -14
- package/dist/components/chat/Window.js.map +1 -1
- package/dist/components/chat/Window.mjs +2 -2
- package/dist/components/chat/index.js +17 -6
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +15 -15
- package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +2 -2
- package/dist/components/chat/messages/RenderAgentStateMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.mjs +2 -2
- package/dist/components/chat/messages/RenderResultMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderResultMessage.mjs +2 -2
- package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderTextMessage.mjs +2 -2
- package/dist/components/index.js +17 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +15 -15
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/package.json +7 -7
- package/src/components/chat/ChatContext.tsx +21 -8
- /package/dist/{chunk-7YQICPBC.mjs.map → chunk-3KBQXU44.mjs.map} +0 -0
- /package/dist/{chunk-XSUSSWDS.mjs.map → chunk-3XAXY2Z3.mjs.map} +0 -0
- /package/dist/{chunk-6VYMULPK.mjs.map → chunk-47OPG5FM.mjs.map} +0 -0
- /package/dist/{chunk-RWT7WRG2.mjs.map → chunk-6BL5C56L.mjs.map} +0 -0
- /package/dist/{chunk-DP5YVGNX.mjs.map → chunk-6INMITFA.mjs.map} +0 -0
- /package/dist/{chunk-SHTMRY45.mjs.map → chunk-CPMIEVKK.mjs.map} +0 -0
- /package/dist/{chunk-BNCTYKEP.mjs.map → chunk-JTINVYPK.mjs.map} +0 -0
- /package/dist/{chunk-TYYJR3LE.mjs.map → chunk-KCAVDFB6.mjs.map} +0 -0
- /package/dist/{chunk-YOH25I6N.mjs.map → chunk-RQNJNK2W.mjs.map} +0 -0
- /package/dist/{chunk-JQOSF44H.mjs.map → chunk-SWADR6EH.mjs.map} +0 -0
- /package/dist/{chunk-FLV3J3VX.mjs.map → chunk-VEC45H6Q.mjs.map} +0 -0
- /package/dist/{chunk-WHSD7DBC.mjs.map → chunk-WYMTXCQU.mjs.map} +0 -0
- /package/dist/{chunk-FO7Z5LAL.mjs.map → chunk-YAGE7RCE.mjs.map} +0 -0
- /package/dist/{chunk-AAY3WWWC.mjs.map → chunk-ZABXREBH.mjs.map} +0 -0
|
@@ -2,35 +2,35 @@ import "../chunk-JD7BAH7U.mjs";
|
|
|
2
2
|
import "../chunk-MRFF7GSQ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KCAVDFB6.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-SWADR6EH.mjs";
|
|
10
|
+
import "../chunk-47OPG5FM.mjs";
|
|
11
|
+
import "../chunk-YAGE7RCE.mjs";
|
|
12
|
+
import "../chunk-VEC45H6Q.mjs";
|
|
13
|
+
import "../chunk-RQNJNK2W.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CopilotChat
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-3KBQXU44.mjs";
|
|
17
17
|
import "../chunk-V7W6IM2V.mjs";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-6BL5C56L.mjs";
|
|
19
|
+
import "../chunk-ZABXREBH.mjs";
|
|
20
|
+
import "../chunk-6INMITFA.mjs";
|
|
21
|
+
import "../chunk-WYMTXCQU.mjs";
|
|
22
22
|
import "../chunk-KFQYJ5R5.mjs";
|
|
23
23
|
import "../chunk-RS6UPR5N.mjs";
|
|
24
24
|
import "../chunk-4FIGRRFS.mjs";
|
|
25
25
|
import "../chunk-OTPAZXVR.mjs";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-JTINVYPK.mjs";
|
|
27
27
|
import "../chunk-YQFVRDNC.mjs";
|
|
28
28
|
import "../chunk-YQ3D5IQV.mjs";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-CPMIEVKK.mjs";
|
|
30
|
+
import "../chunk-3XAXY2Z3.mjs";
|
|
31
31
|
import {
|
|
32
32
|
useChatContext
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-CBBFRI3Q.mjs";
|
|
34
34
|
import "../chunk-UPTB2MVO.mjs";
|
|
35
35
|
import "../chunk-FZC7X5PK.mjs";
|
|
36
36
|
import "../chunk-54JAUBUJ.mjs";
|
package/dist/index.js
CHANGED
|
@@ -356,8 +356,8 @@ var ChatContextProvider = ({
|
|
|
356
356
|
open,
|
|
357
357
|
setOpen
|
|
358
358
|
}) => {
|
|
359
|
-
const
|
|
360
|
-
|
|
359
|
+
const memoizedLabels = (0, import_react.useMemo)(
|
|
360
|
+
() => __spreadValues(__spreadValues({}, {
|
|
361
361
|
initial: "",
|
|
362
362
|
title: "CopilotKit",
|
|
363
363
|
placeholder: "Type a message...",
|
|
@@ -365,7 +365,10 @@ var ChatContextProvider = ({
|
|
|
365
365
|
stopGenerating: "Stop generating",
|
|
366
366
|
regenerateResponse: "Regenerate response"
|
|
367
367
|
}), labels),
|
|
368
|
-
|
|
368
|
+
[labels]
|
|
369
|
+
);
|
|
370
|
+
const memoizedIcons = (0, import_react.useMemo)(
|
|
371
|
+
() => __spreadValues(__spreadValues({}, {
|
|
369
372
|
openIcon: OpenIcon,
|
|
370
373
|
closeIcon: CloseIcon,
|
|
371
374
|
headerCloseIcon: HeaderCloseIcon,
|
|
@@ -376,9 +379,17 @@ var ChatContextProvider = ({
|
|
|
376
379
|
regenerateIcon: RegenerateIcon,
|
|
377
380
|
pushToTalkIcon: PushToTalkIcon
|
|
378
381
|
}), icons),
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
+
[icons]
|
|
383
|
+
);
|
|
384
|
+
const context = (0, import_react.useMemo)(
|
|
385
|
+
() => ({
|
|
386
|
+
labels: memoizedLabels,
|
|
387
|
+
icons: memoizedIcons,
|
|
388
|
+
open,
|
|
389
|
+
setOpen
|
|
390
|
+
}),
|
|
391
|
+
[memoizedLabels, memoizedIcons, open, setOpen]
|
|
392
|
+
);
|
|
382
393
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChatContext.Provider, { value: context, children });
|
|
383
394
|
};
|
|
384
395
|
|