@copilotkit/react-ui 1.0.8 → 1.0.9-pre-async-submit-message.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 (34) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{chunk-I3WXFPLM.mjs → chunk-6TWACO5V.mjs} +2 -2
  3. package/dist/{chunk-CTQJBYFS.mjs → chunk-IN42MBI2.mjs} +2 -2
  4. package/dist/{chunk-I2SHVGZG.mjs → chunk-NS5XXT5G.mjs} +2 -2
  5. package/dist/{chunk-MGUNADV2.mjs → chunk-VPUIM2ZY.mjs} +8 -2
  6. package/dist/chunk-VPUIM2ZY.mjs.map +1 -0
  7. package/dist/components/chat/Chat.d.ts +1 -1
  8. package/dist/components/chat/Chat.js +7 -1
  9. package/dist/components/chat/Chat.js.map +1 -1
  10. package/dist/components/chat/Chat.mjs +1 -1
  11. package/dist/components/chat/Modal.js +7 -1
  12. package/dist/components/chat/Modal.js.map +1 -1
  13. package/dist/components/chat/Modal.mjs +2 -2
  14. package/dist/components/chat/Popup.js +7 -1
  15. package/dist/components/chat/Popup.js.map +1 -1
  16. package/dist/components/chat/Popup.mjs +3 -3
  17. package/dist/components/chat/Sidebar.js +7 -1
  18. package/dist/components/chat/Sidebar.js.map +1 -1
  19. package/dist/components/chat/Sidebar.mjs +3 -3
  20. package/dist/components/chat/index.js +7 -1
  21. package/dist/components/chat/index.js.map +1 -1
  22. package/dist/components/chat/index.mjs +4 -4
  23. package/dist/components/index.js +7 -1
  24. package/dist/components/index.js.map +1 -1
  25. package/dist/components/index.mjs +4 -4
  26. package/dist/index.js +7 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +4 -4
  29. package/package.json +7 -7
  30. package/src/components/chat/Chat.tsx +8 -2
  31. package/dist/chunk-MGUNADV2.mjs.map +0 -1
  32. /package/dist/{chunk-I3WXFPLM.mjs.map → chunk-6TWACO5V.mjs.map} +0 -0
  33. /package/dist/{chunk-CTQJBYFS.mjs.map → chunk-IN42MBI2.mjs.map} +0 -0
  34. /package/dist/{chunk-I2SHVGZG.mjs.map → chunk-NS5XXT5G.mjs.map} +0 -0
@@ -2,18 +2,18 @@ import "../chunk-JD7BAH7U.mjs";
2
2
  import "../chunk-MRFF7GSQ.mjs";
3
3
  import {
4
4
  CopilotSidebar
5
- } from "../chunk-CTQJBYFS.mjs";
5
+ } from "../chunk-IN42MBI2.mjs";
6
6
  import "../chunk-WB3YULQ4.mjs";
7
7
  import {
8
8
  CopilotPopup
9
- } from "../chunk-I2SHVGZG.mjs";
10
- import "../chunk-I3WXFPLM.mjs";
9
+ } from "../chunk-NS5XXT5G.mjs";
10
+ import "../chunk-6TWACO5V.mjs";
11
11
  import "../chunk-B7DNOYVQ.mjs";
12
12
  import "../chunk-SE6DAYSX.mjs";
13
13
  import "../chunk-UC3Y7MWX.mjs";
14
14
  import {
15
15
  CopilotChat
16
- } from "../chunk-MGUNADV2.mjs";
16
+ } from "../chunk-VPUIM2ZY.mjs";
17
17
  import "../chunk-V7W6IM2V.mjs";
18
18
  import "../chunk-KSCXPA74.mjs";
19
19
  import "../chunk-M5A56FBF.mjs";
package/dist/index.js CHANGED
@@ -1884,7 +1884,13 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
1884
1884
  const sendMessage = (messageContent) => __async(void 0, null, function* () {
1885
1885
  abortSuggestions();
1886
1886
  setCurrentSuggestions([]);
1887
- onSubmitMessage == null ? void 0 : onSubmitMessage(messageContent);
1887
+ if (onSubmitMessage) {
1888
+ try {
1889
+ yield onSubmitMessage(messageContent);
1890
+ } catch (error) {
1891
+ console.error("Error in onSubmitMessage:", error);
1892
+ }
1893
+ }
1888
1894
  const message = new import_runtime_client_gql4.TextMessage({
1889
1895
  content: messageContent,
1890
1896
  role: import_runtime_client_gql4.Role.User