@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
@@ -3,11 +3,11 @@ import "../chunk-SQMEPWVT.mjs";
3
3
  import "../chunk-WB3YULQ4.mjs";
4
4
  import {
5
5
  CopilotPopup
6
- } from "../chunk-4LA24FID.mjs";
6
+ } from "../chunk-6QV7AIIG.mjs";
7
7
  import {
8
8
  CopilotSidebar
9
- } from "../chunk-6YTN3554.mjs";
10
- import "../chunk-AENUXMIK.mjs";
9
+ } from "../chunk-U6ISBBRF.mjs";
10
+ import "../chunk-4TWPMWD4.mjs";
11
11
  import "../chunk-P7S3E5UW.mjs";
12
12
  import "../chunk-2OTVZXDX.mjs";
13
13
  import "../chunk-V7W6IM2V.mjs";
@@ -24,9 +24,9 @@ import "../chunk-Q5V6S67N.mjs";
24
24
  import "../chunk-YOEL33HG.mjs";
25
25
  import {
26
26
  CopilotChat
27
- } from "../chunk-T2MTGCY3.mjs";
27
+ } from "../chunk-MYUOPOIL.mjs";
28
28
  import "../chunk-WNC6OCIB.mjs";
29
- import "../chunk-GOJ36LAI.mjs";
29
+ import "../chunk-62QMTKMJ.mjs";
30
30
  import {
31
31
  UserMessage
32
32
  } from "../chunk-HEIDCT7I.mjs";
package/dist/index.js CHANGED
@@ -2071,7 +2071,7 @@ function RenderTextMessage(_a) {
2071
2071
  isLoading: inProgress && isCurrentMessage && !message.content,
2072
2072
  isGenerating: inProgress && isCurrentMessage && !!message.content,
2073
2073
  isCurrentMessage,
2074
- onRegenerate,
2074
+ onRegenerate: () => onRegenerate == null ? void 0 : onRegenerate(message.id),
2075
2075
  onCopy,
2076
2076
  onThumbsUp,
2077
2077
  onThumbsDown
@@ -2471,11 +2471,11 @@ function CopilotChat({
2471
2471
  );
2472
2472
  const chatContext = import_react13.default.useContext(ChatContext);
2473
2473
  const isVisible = chatContext ? chatContext.open : true;
2474
- const handleRegenerate = () => {
2474
+ const handleRegenerate = (messageId) => {
2475
2475
  if (onRegenerate) {
2476
- onRegenerate();
2476
+ onRegenerate(messageId);
2477
2477
  }
2478
- reloadMessages();
2478
+ reloadMessages(messageId);
2479
2479
  };
2480
2480
  const handleCopy = (message) => {
2481
2481
  if (onCopy) {
@@ -2667,7 +2667,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
2667
2667
  defaultStopGeneration();
2668
2668
  }
2669
2669
  }
2670
- function reloadMessages() {
2670
+ function reloadMessages(messageId) {
2671
2671
  if (onReloadMessages) {
2672
2672
  onReloadMessages({
2673
2673
  messages,
@@ -2677,10 +2677,11 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
2677
2677
  restartCurrentAgent,
2678
2678
  stopCurrentAgent,
2679
2679
  runCurrentAgent,
2680
- setCurrentAgentState
2680
+ setCurrentAgentState,
2681
+ messageId
2681
2682
  });
2682
2683
  } else {
2683
- defaultReloadMessages();
2684
+ defaultReloadMessages(messageId);
2684
2685
  }
2685
2686
  }
2686
2687
  return {