@copilotkit/react-ui 1.3.3 → 1.3.5-pre-1-3-4.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 (48) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{chunk-UUHCZZZV.mjs → chunk-3CQ72Y7E.mjs} +2 -2
  3. package/dist/{chunk-GHMYWL42.mjs → chunk-FRFXYFEH.mjs} +2 -2
  4. package/dist/{chunk-I4QG2ZZU.mjs → chunk-LT5YTQ4F.mjs} +2 -2
  5. package/dist/{chunk-I4QG2ZZU.mjs.map → chunk-LT5YTQ4F.mjs.map} +1 -1
  6. package/dist/{chunk-U42OB2S3.mjs → chunk-N4JRGTUJ.mjs} +6 -1
  7. package/dist/chunk-N4JRGTUJ.mjs.map +1 -0
  8. package/dist/{chunk-3YESXHJH.mjs → chunk-P4N6EWUO.mjs} +2 -2
  9. package/dist/{chunk-BTOVRBBW.mjs → chunk-U7CXOZEV.mjs} +4 -4
  10. package/dist/{chunk-BTOVRBBW.mjs.map → chunk-U7CXOZEV.mjs.map} +1 -1
  11. package/dist/components/chat/Chat.js +7 -2
  12. package/dist/components/chat/Chat.js.map +1 -1
  13. package/dist/components/chat/Chat.mjs +3 -3
  14. package/dist/components/chat/Modal.js +7 -2
  15. package/dist/components/chat/Modal.js.map +1 -1
  16. package/dist/components/chat/Modal.mjs +4 -4
  17. package/dist/components/chat/Popup.js +7 -2
  18. package/dist/components/chat/Popup.js.map +1 -1
  19. package/dist/components/chat/Popup.mjs +5 -5
  20. package/dist/components/chat/Sidebar.js +7 -2
  21. package/dist/components/chat/Sidebar.js.map +1 -1
  22. package/dist/components/chat/Sidebar.mjs +5 -5
  23. package/dist/components/chat/index.js +7 -2
  24. package/dist/components/chat/index.js.map +1 -1
  25. package/dist/components/chat/index.mjs +6 -6
  26. package/dist/components/chat/messages/RenderAgentStateMessage.js +5 -0
  27. package/dist/components/chat/messages/RenderAgentStateMessage.js.map +1 -1
  28. package/dist/components/chat/messages/RenderAgentStateMessage.mjs +1 -1
  29. package/dist/components/dev-console/console.js +1 -1
  30. package/dist/components/dev-console/console.js.map +1 -1
  31. package/dist/components/dev-console/console.mjs +1 -1
  32. package/dist/components/dev-console/index.js +1 -1
  33. package/dist/components/dev-console/index.js.map +1 -1
  34. package/dist/components/dev-console/index.mjs +1 -1
  35. package/dist/components/index.js +7 -2
  36. package/dist/components/index.js.map +1 -1
  37. package/dist/components/index.mjs +6 -6
  38. package/dist/index.js +7 -2
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +6 -6
  41. package/package.json +7 -7
  42. package/src/components/chat/Chat.tsx +4 -3
  43. package/src/components/chat/messages/RenderAgentStateMessage.tsx +10 -0
  44. package/src/components/dev-console/console.tsx +1 -1
  45. package/dist/chunk-U42OB2S3.mjs.map +0 -1
  46. /package/dist/{chunk-UUHCZZZV.mjs.map → chunk-3CQ72Y7E.mjs.map} +0 -0
  47. /package/dist/{chunk-GHMYWL42.mjs.map → chunk-FRFXYFEH.mjs.map} +0 -0
  48. /package/dist/{chunk-3YESXHJH.mjs.map → chunk-P4N6EWUO.mjs.map} +0 -0
@@ -2,25 +2,25 @@ import "../chunk-JD7BAH7U.mjs";
2
2
  import "../chunk-MRFF7GSQ.mjs";
3
3
  import {
4
4
  CopilotSidebar
5
- } from "../chunk-UUHCZZZV.mjs";
5
+ } from "../chunk-3CQ72Y7E.mjs";
6
6
  import "../chunk-WB3YULQ4.mjs";
7
7
  import {
8
8
  CopilotPopup
9
- } from "../chunk-GHMYWL42.mjs";
10
- import "../chunk-3YESXHJH.mjs";
9
+ } from "../chunk-FRFXYFEH.mjs";
10
+ import "../chunk-P4N6EWUO.mjs";
11
11
  import "../chunk-FO7Z5LAL.mjs";
12
12
  import "../chunk-FLV3J3VX.mjs";
13
13
  import "../chunk-YOH25I6N.mjs";
14
14
  import {
15
15
  CopilotChat
16
- } from "../chunk-BTOVRBBW.mjs";
16
+ } from "../chunk-U7CXOZEV.mjs";
17
17
  import "../chunk-V7W6IM2V.mjs";
18
18
  import "../chunk-YH2STM73.mjs";
19
- import "../chunk-U42OB2S3.mjs";
19
+ import "../chunk-N4JRGTUJ.mjs";
20
20
  import "../chunk-GOTHQ665.mjs";
21
21
  import "../chunk-MA5B5ELM.mjs";
22
22
  import "../chunk-WCPLXRZX.mjs";
23
- import "../chunk-I4QG2ZZU.mjs";
23
+ import "../chunk-LT5YTQ4F.mjs";
24
24
  import "../chunk-H7TM5JE6.mjs";
25
25
  import "../chunk-OTPAZXVR.mjs";
26
26
  import "../chunk-U6J5DGOE.mjs";
package/dist/index.js CHANGED
@@ -1463,6 +1463,11 @@ function RenderAgentStateMessage(props) {
1463
1463
  if (!toRender && status === "complete") {
1464
1464
  return null;
1465
1465
  }
1466
+ if (!toRender && isCurrentMessage && inProgress) {
1467
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: icons.spinnerIcon }, index);
1468
+ } else if (!toRender) {
1469
+ return null;
1470
+ }
1466
1471
  if (typeof toRender === "string") {
1467
1472
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
1468
1473
  isCurrentMessage && inProgress && icons.spinnerIcon,
@@ -1971,7 +1976,7 @@ function DebugMenuButton({
1971
1976
  mode
1972
1977
  }) {
1973
1978
  const context = (0, import_react_core7.useCopilotContext)();
1974
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-black fixed top-24 w-52 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react10.Menu, { children: [
1979
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-black top-24 w-52 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react10.Menu, { children: [
1975
1980
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react10.MenuButton, { className: `copilotKitDebugMenuButton ${mode === "compact" ? "compact" : ""}`, children: mode == "compact" ? "Debug" : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1976
1981
  "Debug ",
1977
1982
  ChevronDownIcon
@@ -2124,7 +2129,6 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
2124
2129
  content: messageContent,
2125
2130
  role: import_runtime_client_gql10.Role.User
2126
2131
  });
2127
- appendMessage(message);
2128
2132
  if (onSubmitMessage) {
2129
2133
  try {
2130
2134
  yield onSubmitMessage(messageContent);
@@ -2132,6 +2136,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
2132
2136
  console.error("Error in onSubmitMessage:", error);
2133
2137
  }
2134
2138
  }
2139
+ appendMessage(message);
2135
2140
  return message;
2136
2141
  });
2137
2142
  return {