@copilotkit/react-ui 1.8.10-next.3 → 1.8.11-next.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 +23 -0
- package/dist/{chunk-IJADIQAR.mjs → chunk-IIRQWGWV.mjs} +4 -6
- package/dist/chunk-IIRQWGWV.mjs.map +1 -0
- package/dist/{chunk-B4N2T3V3.mjs → chunk-IWBARPUZ.mjs} +3 -9
- package/dist/chunk-IWBARPUZ.mjs.map +1 -0
- package/dist/{chunk-FHVERB23.mjs → chunk-QXWJ7HYU.mjs} +3 -3
- package/dist/{chunk-T4ETOM63.mjs → chunk-SJWVHGKD.mjs} +2 -2
- package/dist/{chunk-DP6QC6LJ.mjs → chunk-T5637OOY.mjs} +2 -2
- package/dist/{chunk-IJDF7C64.mjs → chunk-W2OWARTP.mjs} +4 -4
- package/dist/components/chat/Chat.js +4 -12
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +3 -3
- package/dist/components/chat/Input.js +1 -7
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Messages.js +3 -5
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +1 -1
- package/dist/components/chat/Modal.js +4 -12
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +4 -4
- package/dist/components/chat/Popup.js +4 -12
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +5 -5
- package/dist/components/chat/Sidebar.js +4 -12
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +5 -5
- package/dist/components/chat/index.js +4 -12
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +6 -6
- package/dist/components/index.js +4 -12
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +6 -6
- package/dist/index.js +4 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/package.json +4 -4
- package/src/components/chat/Input.tsx +15 -6
- package/src/components/chat/Messages.tsx +5 -6
- package/dist/chunk-B4N2T3V3.mjs.map +0 -1
- package/dist/chunk-IJADIQAR.mjs.map +0 -1
- /package/dist/{chunk-FHVERB23.mjs.map → chunk-QXWJ7HYU.mjs.map} +0 -0
- /package/dist/{chunk-T4ETOM63.mjs.map → chunk-SJWVHGKD.mjs.map} +0 -0
- /package/dist/{chunk-DP6QC6LJ.mjs.map → chunk-T5637OOY.mjs.map} +0 -0
- /package/dist/{chunk-IJDF7C64.mjs.map → chunk-W2OWARTP.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-W2OWARTP.mjs";
|
|
4
4
|
import "../../chunk-Q2NFQTCQ.mjs";
|
|
5
5
|
import "../../chunk-UH2UFL5W.mjs";
|
|
6
6
|
import "../../chunk-V7W6IM2V.mjs";
|
|
@@ -11,7 +11,7 @@ import "../../chunk-KXE2JCUH.mjs";
|
|
|
11
11
|
import "../../chunk-NRA3CFEE.mjs";
|
|
12
12
|
import "../../chunk-BH6PCAAL.mjs";
|
|
13
13
|
import "../../chunk-UFN2VWSR.mjs";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-QXWJ7HYU.mjs";
|
|
15
15
|
import "../../chunk-DSQGQJI4.mjs";
|
|
16
16
|
import "../../chunk-24TDU7MY.mjs";
|
|
17
17
|
import "../../chunk-SLTG4L62.mjs";
|
|
@@ -21,11 +21,11 @@ import "../../chunk-HWMFMBJC.mjs";
|
|
|
21
21
|
import "../../chunk-OZXUB3V7.mjs";
|
|
22
22
|
import "../../chunk-XZNY26GH.mjs";
|
|
23
23
|
import "../../chunk-PLHTVHUW.mjs";
|
|
24
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-IWBARPUZ.mjs";
|
|
25
25
|
import "../../chunk-YQFVRDNC.mjs";
|
|
26
26
|
import "../../chunk-ABHUX6T6.mjs";
|
|
27
27
|
import "../../chunk-KENCH7RN.mjs";
|
|
28
|
-
import "../../chunk-
|
|
28
|
+
import "../../chunk-IIRQWGWV.mjs";
|
|
29
29
|
import "../../chunk-IEMQ2SQW.mjs";
|
|
30
30
|
import "../../chunk-XWG3L6QC.mjs";
|
|
31
31
|
import "../../chunk-54JAUBUJ.mjs";
|
|
@@ -1110,7 +1110,7 @@ var Messages = ({
|
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
const {
|
|
1113
|
+
const { messagesContainerRef, messagesEndRef } = useScrollToBottom(messages);
|
|
1114
1114
|
const interrupt = (0, import_react_core4.useLangGraphInterruptRender)();
|
|
1115
1115
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitMessages", ref: messagesContainerRef, children: [
|
|
1116
1116
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitMessagesContainer", children: [
|
|
@@ -1219,11 +1219,9 @@ function useScrollToBottom(messages) {
|
|
|
1219
1219
|
const isProgrammaticScrollRef = (0, import_react6.useRef)(false);
|
|
1220
1220
|
const isUserScrollUpRef = (0, import_react6.useRef)(false);
|
|
1221
1221
|
const scrollToBottom = () => {
|
|
1222
|
-
if (messagesEndRef.current) {
|
|
1222
|
+
if (messagesContainerRef.current && messagesEndRef.current) {
|
|
1223
1223
|
isProgrammaticScrollRef.current = true;
|
|
1224
|
-
|
|
1225
|
-
behavior: "auto"
|
|
1226
|
-
});
|
|
1224
|
+
messagesContainerRef.current.scrollTop = messagesContainerRef.current.scrollHeight;
|
|
1227
1225
|
}
|
|
1228
1226
|
};
|
|
1229
1227
|
const handleScroll = () => {
|
|
@@ -1456,12 +1454,6 @@ var Input = ({ inProgress, onSend, isVisible = false, onStop, onUpload }) => {
|
|
|
1456
1454
|
setText("");
|
|
1457
1455
|
(_a = textareaRef.current) == null ? void 0 : _a.focus();
|
|
1458
1456
|
};
|
|
1459
|
-
(0, import_react9.useEffect)(() => {
|
|
1460
|
-
var _a;
|
|
1461
|
-
if (isVisible) {
|
|
1462
|
-
(_a = textareaRef.current) == null ? void 0 : _a.focus();
|
|
1463
|
-
}
|
|
1464
|
-
}, [isVisible]);
|
|
1465
1457
|
const { pushToTalkState, setPushToTalkState } = usePushToTalk({
|
|
1466
1458
|
sendFunction: onSend,
|
|
1467
1459
|
inProgress
|
|
@@ -1482,7 +1474,7 @@ var Input = ({ inProgress, onSend, isVisible = false, onStop, onUpload }) => {
|
|
|
1482
1474
|
{
|
|
1483
1475
|
ref: textareaRef,
|
|
1484
1476
|
placeholder: context.labels.placeholder,
|
|
1485
|
-
autoFocus:
|
|
1477
|
+
autoFocus: false,
|
|
1486
1478
|
maxRows: MAX_NEWLINES,
|
|
1487
1479
|
value: text,
|
|
1488
1480
|
onChange: (event) => setText(event.target.value),
|