@copilotkit/react-ui 1.8.10 → 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-IJADIQAR.mjs → chunk-IIRQWGWV.mjs} +4 -6
  3. package/dist/chunk-IIRQWGWV.mjs.map +1 -0
  4. package/dist/{chunk-B4N2T3V3.mjs → chunk-IWBARPUZ.mjs} +3 -9
  5. package/dist/chunk-IWBARPUZ.mjs.map +1 -0
  6. package/dist/{chunk-FHVERB23.mjs → chunk-QXWJ7HYU.mjs} +3 -3
  7. package/dist/{chunk-VL4VF3G3.mjs → chunk-SJWVHGKD.mjs} +2 -2
  8. package/dist/{chunk-R7KOZN52.mjs → chunk-T5637OOY.mjs} +2 -2
  9. package/dist/{chunk-G46M4XOH.mjs → chunk-UH2UFL5W.mjs} +2 -2
  10. package/dist/{chunk-NGAREIRF.mjs → chunk-VGPQYMKJ.mjs} +4 -4
  11. package/dist/{chunk-D7X2S5GH.mjs → chunk-W2OWARTP.mjs} +5 -5
  12. package/dist/components/chat/Chat.js +4 -12
  13. package/dist/components/chat/Chat.js.map +1 -1
  14. package/dist/components/chat/Chat.mjs +3 -3
  15. package/dist/components/chat/Header.mjs +4 -4
  16. package/dist/components/chat/Input.js +1 -7
  17. package/dist/components/chat/Input.js.map +1 -1
  18. package/dist/components/chat/Input.mjs +1 -1
  19. package/dist/components/chat/Messages.js +3 -5
  20. package/dist/components/chat/Messages.js.map +1 -1
  21. package/dist/components/chat/Messages.mjs +1 -1
  22. package/dist/components/chat/Modal.js +4 -12
  23. package/dist/components/chat/Modal.js.map +1 -1
  24. package/dist/components/chat/Modal.mjs +8 -8
  25. package/dist/components/chat/Popup.js +4 -12
  26. package/dist/components/chat/Popup.js.map +1 -1
  27. package/dist/components/chat/Popup.mjs +9 -9
  28. package/dist/components/chat/Sidebar.js +4 -12
  29. package/dist/components/chat/Sidebar.js.map +1 -1
  30. package/dist/components/chat/Sidebar.mjs +9 -9
  31. package/dist/components/chat/index.js +4 -12
  32. package/dist/components/chat/index.js.map +1 -1
  33. package/dist/components/chat/index.mjs +10 -10
  34. package/dist/components/dev-console/console.mjs +3 -3
  35. package/dist/components/dev-console/index.mjs +3 -3
  36. package/dist/components/index.js +4 -12
  37. package/dist/components/index.js.map +1 -1
  38. package/dist/components/index.mjs +10 -10
  39. package/dist/index.js +4 -12
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +10 -10
  42. package/package.json +4 -4
  43. package/src/components/chat/Input.tsx +15 -6
  44. package/src/components/chat/Messages.tsx +5 -6
  45. package/dist/chunk-B4N2T3V3.mjs.map +0 -1
  46. package/dist/chunk-IJADIQAR.mjs.map +0 -1
  47. /package/dist/{chunk-FHVERB23.mjs.map → chunk-QXWJ7HYU.mjs.map} +0 -0
  48. /package/dist/{chunk-VL4VF3G3.mjs.map → chunk-SJWVHGKD.mjs.map} +0 -0
  49. /package/dist/{chunk-R7KOZN52.mjs.map → chunk-T5637OOY.mjs.map} +0 -0
  50. /package/dist/{chunk-G46M4XOH.mjs.map → chunk-UH2UFL5W.mjs.map} +0 -0
  51. /package/dist/{chunk-NGAREIRF.mjs.map → chunk-VGPQYMKJ.mjs.map} +0 -0
  52. /package/dist/{chunk-D7X2S5GH.mjs.map → chunk-W2OWARTP.mjs.map} +0 -0
@@ -2,29 +2,29 @@ import "../chunk-MMVDU6DF.mjs";
2
2
  import "../chunk-PXEVB7IK.mjs";
3
3
  import {
4
4
  CopilotPopup
5
- } from "../chunk-VL4VF3G3.mjs";
5
+ } from "../chunk-SJWVHGKD.mjs";
6
6
  import {
7
7
  CopilotSidebar
8
- } from "../chunk-R7KOZN52.mjs";
8
+ } from "../chunk-T5637OOY.mjs";
9
9
  import "../chunk-WB3YULQ4.mjs";
10
- import "../chunk-D7X2S5GH.mjs";
10
+ import "../chunk-W2OWARTP.mjs";
11
11
  import "../chunk-Q2NFQTCQ.mjs";
12
- import "../chunk-G46M4XOH.mjs";
12
+ import "../chunk-UH2UFL5W.mjs";
13
13
  import "../chunk-V7W6IM2V.mjs";
14
14
  import {
15
15
  CopilotDevConsole
16
- } from "../chunk-NGAREIRF.mjs";
17
- import "../chunk-KXE2JCUH.mjs";
18
- import "../chunk-NRA3CFEE.mjs";
16
+ } from "../chunk-VGPQYMKJ.mjs";
19
17
  import "../chunk-Q5V6S67N.mjs";
20
18
  import {
21
19
  shouldShowDevConsole
22
20
  } from "../chunk-6TCUJ3B7.mjs";
21
+ import "../chunk-KXE2JCUH.mjs";
22
+ import "../chunk-NRA3CFEE.mjs";
23
23
  import "../chunk-BH6PCAAL.mjs";
24
24
  import "../chunk-UFN2VWSR.mjs";
25
25
  import {
26
26
  CopilotChat
27
- } from "../chunk-FHVERB23.mjs";
27
+ } from "../chunk-QXWJ7HYU.mjs";
28
28
  import "../chunk-DSQGQJI4.mjs";
29
29
  import "../chunk-24TDU7MY.mjs";
30
30
  import {
@@ -40,13 +40,13 @@ import {
40
40
  } from "../chunk-OZXUB3V7.mjs";
41
41
  import "../chunk-XZNY26GH.mjs";
42
42
  import "../chunk-PLHTVHUW.mjs";
43
- import "../chunk-B4N2T3V3.mjs";
43
+ import "../chunk-IWBARPUZ.mjs";
44
44
  import "../chunk-YQFVRDNC.mjs";
45
45
  import {
46
46
  Markdown
47
47
  } from "../chunk-ABHUX6T6.mjs";
48
48
  import "../chunk-KENCH7RN.mjs";
49
- import "../chunk-IJADIQAR.mjs";
49
+ import "../chunk-IIRQWGWV.mjs";
50
50
  import {
51
51
  useChatContext
52
52
  } from "../chunk-IEMQ2SQW.mjs";
package/dist/index.js CHANGED
@@ -1121,7 +1121,7 @@ var Messages = ({
1121
1121
  }
1122
1122
  }
1123
1123
  }
1124
- const { messagesEndRef, messagesContainerRef } = useScrollToBottom(messages);
1124
+ const { messagesContainerRef, messagesEndRef } = useScrollToBottom(messages);
1125
1125
  const interrupt = (0, import_react_core4.useLangGraphInterruptRender)();
1126
1126
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitMessages", ref: messagesContainerRef, children: [
1127
1127
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitMessagesContainer", children: [
@@ -1230,11 +1230,9 @@ function useScrollToBottom(messages) {
1230
1230
  const isProgrammaticScrollRef = (0, import_react6.useRef)(false);
1231
1231
  const isUserScrollUpRef = (0, import_react6.useRef)(false);
1232
1232
  const scrollToBottom = () => {
1233
- if (messagesEndRef.current) {
1233
+ if (messagesContainerRef.current && messagesEndRef.current) {
1234
1234
  isProgrammaticScrollRef.current = true;
1235
- messagesEndRef.current.scrollIntoView({
1236
- behavior: "auto"
1237
- });
1235
+ messagesContainerRef.current.scrollTop = messagesContainerRef.current.scrollHeight;
1238
1236
  }
1239
1237
  };
1240
1238
  const handleScroll = () => {
@@ -1467,12 +1465,6 @@ var Input = ({ inProgress, onSend, isVisible = false, onStop, onUpload }) => {
1467
1465
  setText("");
1468
1466
  (_a = textareaRef.current) == null ? void 0 : _a.focus();
1469
1467
  };
1470
- (0, import_react9.useEffect)(() => {
1471
- var _a;
1472
- if (isVisible) {
1473
- (_a = textareaRef.current) == null ? void 0 : _a.focus();
1474
- }
1475
- }, [isVisible]);
1476
1468
  const { pushToTalkState, setPushToTalkState } = usePushToTalk({
1477
1469
  sendFunction: onSend,
1478
1470
  inProgress
@@ -1493,7 +1485,7 @@ var Input = ({ inProgress, onSend, isVisible = false, onStop, onUpload }) => {
1493
1485
  {
1494
1486
  ref: textareaRef,
1495
1487
  placeholder: context.labels.placeholder,
1496
- autoFocus: true,
1488
+ autoFocus: false,
1497
1489
  maxRows: MAX_NEWLINES,
1498
1490
  value: text,
1499
1491
  onChange: (event) => setText(event.target.value),