@copilotkit/react-ui 1.8.5-next.0 → 1.8.5-next.1

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 (43) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{chunk-AENUXMIK.mjs → chunk-4TWPMWD4.mjs} +2 -2
  3. package/dist/{chunk-GOJ36LAI.mjs → chunk-62QMTKMJ.mjs} +2 -2
  4. package/dist/{chunk-GOJ36LAI.mjs.map → chunk-62QMTKMJ.mjs.map} +1 -1
  5. package/dist/{chunk-4LA24FID.mjs → chunk-6QV7AIIG.mjs} +2 -2
  6. package/dist/{chunk-T2MTGCY3.mjs → chunk-MYUOPOIL.mjs} +9 -8
  7. package/dist/chunk-MYUOPOIL.mjs.map +1 -0
  8. package/dist/{chunk-6YTN3554.mjs → chunk-U6ISBBRF.mjs} +2 -2
  9. package/dist/components/chat/Chat.d.ts +8 -3
  10. package/dist/components/chat/Chat.js +8 -7
  11. package/dist/components/chat/Chat.js.map +1 -1
  12. package/dist/components/chat/Chat.mjs +2 -2
  13. package/dist/components/chat/Modal.js +8 -7
  14. package/dist/components/chat/Modal.js.map +1 -1
  15. package/dist/components/chat/Modal.mjs +3 -3
  16. package/dist/components/chat/Popup.js +8 -7
  17. package/dist/components/chat/Popup.js.map +1 -1
  18. package/dist/components/chat/Popup.mjs +4 -4
  19. package/dist/components/chat/Sidebar.js +8 -7
  20. package/dist/components/chat/Sidebar.js.map +1 -1
  21. package/dist/components/chat/Sidebar.mjs +4 -4
  22. package/dist/components/chat/index.js +8 -7
  23. package/dist/components/chat/index.js.map +1 -1
  24. package/dist/components/chat/index.mjs +5 -5
  25. package/dist/components/chat/messages/RenderTextMessage.js +1 -1
  26. package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
  27. package/dist/components/chat/messages/RenderTextMessage.mjs +1 -1
  28. package/dist/components/chat/props.d.ts +2 -2
  29. package/dist/components/chat/props.js.map +1 -1
  30. package/dist/components/index.js +8 -7
  31. package/dist/components/index.js.map +1 -1
  32. package/dist/components/index.mjs +5 -5
  33. package/dist/index.js +8 -7
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +5 -5
  36. package/package.json +6 -6
  37. package/src/components/chat/Chat.tsx +13 -7
  38. package/src/components/chat/messages/RenderTextMessage.tsx +1 -1
  39. package/src/components/chat/props.ts +2 -2
  40. package/dist/chunk-T2MTGCY3.mjs.map +0 -1
  41. /package/dist/{chunk-AENUXMIK.mjs.map → chunk-4TWPMWD4.mjs.map} +0 -0
  42. /package/dist/{chunk-4LA24FID.mjs.map → chunk-6QV7AIIG.mjs.map} +0 -0
  43. /package/dist/{chunk-6YTN3554.mjs.map → chunk-U6ISBBRF.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CopilotSidebar
3
- } from "../../chunk-6YTN3554.mjs";
4
- import "../../chunk-AENUXMIK.mjs";
3
+ } from "../../chunk-U6ISBBRF.mjs";
4
+ import "../../chunk-4TWPMWD4.mjs";
5
5
  import "../../chunk-P7S3E5UW.mjs";
6
6
  import "../../chunk-2OTVZXDX.mjs";
7
7
  import "../../chunk-V7W6IM2V.mjs";
@@ -12,9 +12,9 @@ import "../../chunk-NRA3CFEE.mjs";
12
12
  import "../../chunk-BH6PCAAL.mjs";
13
13
  import "../../chunk-Q5V6S67N.mjs";
14
14
  import "../../chunk-YOEL33HG.mjs";
15
- import "../../chunk-T2MTGCY3.mjs";
15
+ import "../../chunk-MYUOPOIL.mjs";
16
16
  import "../../chunk-WNC6OCIB.mjs";
17
- import "../../chunk-GOJ36LAI.mjs";
17
+ import "../../chunk-62QMTKMJ.mjs";
18
18
  import "../../chunk-HEIDCT7I.mjs";
19
19
  import "../../chunk-NMNC4ROZ.mjs";
20
20
  import "../../chunk-Q2YY2NX3.mjs";
@@ -2067,7 +2067,7 @@ function RenderTextMessage(_a) {
2067
2067
  isLoading: inProgress && isCurrentMessage && !message.content,
2068
2068
  isGenerating: inProgress && isCurrentMessage && !!message.content,
2069
2069
  isCurrentMessage,
2070
- onRegenerate,
2070
+ onRegenerate: () => onRegenerate == null ? void 0 : onRegenerate(message.id),
2071
2071
  onCopy,
2072
2072
  onThumbsUp,
2073
2073
  onThumbsDown
@@ -2467,11 +2467,11 @@ function CopilotChat({
2467
2467
  );
2468
2468
  const chatContext = import_react13.default.useContext(ChatContext);
2469
2469
  const isVisible = chatContext ? chatContext.open : true;
2470
- const handleRegenerate = () => {
2470
+ const handleRegenerate = (messageId) => {
2471
2471
  if (onRegenerate) {
2472
- onRegenerate();
2472
+ onRegenerate(messageId);
2473
2473
  }
2474
- reloadMessages();
2474
+ reloadMessages(messageId);
2475
2475
  };
2476
2476
  const handleCopy = (message) => {
2477
2477
  if (onCopy) {
@@ -2663,7 +2663,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
2663
2663
  defaultStopGeneration();
2664
2664
  }
2665
2665
  }
2666
- function reloadMessages() {
2666
+ function reloadMessages(messageId) {
2667
2667
  if (onReloadMessages) {
2668
2668
  onReloadMessages({
2669
2669
  messages,
@@ -2673,10 +2673,11 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
2673
2673
  restartCurrentAgent,
2674
2674
  stopCurrentAgent,
2675
2675
  runCurrentAgent,
2676
- setCurrentAgentState
2676
+ setCurrentAgentState,
2677
+ messageId
2677
2678
  });
2678
2679
  } else {
2679
- defaultReloadMessages();
2680
+ defaultReloadMessages(messageId);
2680
2681
  }
2681
2682
  }
2682
2683
  return {