@copilotkit/react-ui 1.0.9-pre-async-submit-message.0 → 1.0.9

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 (54) hide show
  1. package/CHANGELOG.md +5 -5
  2. package/dist/{chunk-IN42MBI2.mjs → chunk-64STG5VG.mjs} +2 -2
  3. package/dist/{chunk-M5A56FBF.mjs → chunk-D6QNFZXK.mjs} +9 -3
  4. package/dist/chunk-D6QNFZXK.mjs.map +1 -0
  5. package/dist/{chunk-NS5XXT5G.mjs → chunk-E6UH55HG.mjs} +2 -2
  6. package/dist/{chunk-6TWACO5V.mjs → chunk-KISORA5S.mjs} +3 -3
  7. package/dist/{chunk-B7DNOYVQ.mjs → chunk-LLOSOTAT.mjs} +7 -2
  8. package/dist/chunk-LLOSOTAT.mjs.map +1 -0
  9. package/dist/{chunk-RT2BA4MP.mjs → chunk-PF5HUDUP.mjs} +11 -2
  10. package/dist/{chunk-RT2BA4MP.mjs.map → chunk-PF5HUDUP.mjs.map} +1 -1
  11. package/dist/{chunk-VPUIM2ZY.mjs → chunk-TS7TVUBD.mjs} +2 -2
  12. package/dist/components/chat/Chat.js +17 -2
  13. package/dist/components/chat/Chat.js.map +1 -1
  14. package/dist/components/chat/Chat.mjs +3 -3
  15. package/dist/components/chat/Modal.js +23 -3
  16. package/dist/components/chat/Modal.js.map +1 -1
  17. package/dist/components/chat/Modal.mjs +5 -5
  18. package/dist/components/chat/Popup.js +23 -3
  19. package/dist/components/chat/Popup.js.map +1 -1
  20. package/dist/components/chat/Popup.mjs +6 -6
  21. package/dist/components/chat/Sidebar.js +23 -3
  22. package/dist/components/chat/Sidebar.js.map +1 -1
  23. package/dist/components/chat/Sidebar.mjs +6 -6
  24. package/dist/components/chat/Window.js +6 -1
  25. package/dist/components/chat/Window.js.map +1 -1
  26. package/dist/components/chat/Window.mjs +1 -1
  27. package/dist/components/chat/index.js +23 -3
  28. package/dist/components/chat/index.js.map +1 -1
  29. package/dist/components/chat/index.mjs +7 -7
  30. package/dist/components/dev-console/console.js +17 -2
  31. package/dist/components/dev-console/console.js.map +1 -1
  32. package/dist/components/dev-console/console.mjs +2 -2
  33. package/dist/components/dev-console/index.js +17 -2
  34. package/dist/components/dev-console/index.js.map +1 -1
  35. package/dist/components/dev-console/index.mjs +2 -2
  36. package/dist/components/dev-console/utils.js +10 -1
  37. package/dist/components/dev-console/utils.js.map +1 -1
  38. package/dist/components/dev-console/utils.mjs +1 -1
  39. package/dist/components/index.js +23 -3
  40. package/dist/components/index.js.map +1 -1
  41. package/dist/components/index.mjs +7 -7
  42. package/dist/index.js +23 -3
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +7 -7
  45. package/package.json +7 -7
  46. package/src/components/chat/Window.tsx +12 -1
  47. package/src/components/dev-console/console.tsx +11 -1
  48. package/src/components/dev-console/utils.ts +10 -1
  49. package/dist/chunk-B7DNOYVQ.mjs.map +0 -1
  50. package/dist/chunk-M5A56FBF.mjs.map +0 -1
  51. /package/dist/{chunk-IN42MBI2.mjs.map → chunk-64STG5VG.mjs.map} +0 -0
  52. /package/dist/{chunk-NS5XXT5G.mjs.map → chunk-E6UH55HG.mjs.map} +0 -0
  53. /package/dist/{chunk-6TWACO5V.mjs.map → chunk-KISORA5S.mjs.map} +0 -0
  54. /package/dist/{chunk-VPUIM2ZY.mjs.map → chunk-TS7TVUBD.mjs.map} +0 -0
@@ -2,22 +2,22 @@ import "../chunk-JD7BAH7U.mjs";
2
2
  import "../chunk-MRFF7GSQ.mjs";
3
3
  import {
4
4
  CopilotSidebar
5
- } from "../chunk-IN42MBI2.mjs";
5
+ } from "../chunk-64STG5VG.mjs";
6
6
  import "../chunk-WB3YULQ4.mjs";
7
7
  import {
8
8
  CopilotPopup
9
- } from "../chunk-NS5XXT5G.mjs";
10
- import "../chunk-6TWACO5V.mjs";
11
- import "../chunk-B7DNOYVQ.mjs";
9
+ } from "../chunk-E6UH55HG.mjs";
10
+ import "../chunk-KISORA5S.mjs";
11
+ import "../chunk-LLOSOTAT.mjs";
12
12
  import "../chunk-SE6DAYSX.mjs";
13
13
  import "../chunk-UC3Y7MWX.mjs";
14
14
  import {
15
15
  CopilotChat
16
- } from "../chunk-VPUIM2ZY.mjs";
16
+ } from "../chunk-TS7TVUBD.mjs";
17
17
  import "../chunk-V7W6IM2V.mjs";
18
18
  import "../chunk-KSCXPA74.mjs";
19
- import "../chunk-M5A56FBF.mjs";
20
- import "../chunk-RT2BA4MP.mjs";
19
+ import "../chunk-D6QNFZXK.mjs";
20
+ import "../chunk-PF5HUDUP.mjs";
21
21
  import "../chunk-OTPAZXVR.mjs";
22
22
  import "../chunk-U6J5DGOE.mjs";
23
23
  import "../chunk-YQFVRDNC.mjs";
package/dist/index.js CHANGED
@@ -401,7 +401,12 @@ var Window = ({
401
401
  return;
402
402
  }
403
403
  const parentElement = (_a = windowRef.current) == null ? void 0 : _a.parentElement;
404
- if (open && parentElement && !parentElement.contains(event.target)) {
404
+ let className = "";
405
+ if (event.target instanceof HTMLElement) {
406
+ className = event.target.className;
407
+ }
408
+ if (open && parentElement && !parentElement.contains(event.target) && // prevent closing the window when clicking on the debug menu
409
+ !className.includes("copilotKitDebugMenu")) {
405
410
  setOpen(false);
406
411
  }
407
412
  },
@@ -1487,9 +1492,18 @@ function getPublishedCopilotKitVersion(current, forceCheck = false) {
1487
1492
  });
1488
1493
  }
1489
1494
  function logReadables(context) {
1490
- console.log(context.getContextString([], import_react_core5.defaultCopilotContextCategories));
1495
+ const readables = context.getContextString([], import_react_core5.defaultCopilotContextCategories).trim();
1496
+ if (readables.length === 0) {
1497
+ console.log("No readables found");
1498
+ return;
1499
+ }
1500
+ console.log(readables);
1491
1501
  }
1492
1502
  function logActions(context) {
1503
+ if (Object.values(context.actions).length === 0) {
1504
+ console.log("No actions found");
1505
+ return;
1506
+ }
1493
1507
  for (const action of Object.values(context.actions)) {
1494
1508
  console.group(action.name);
1495
1509
  console.log("name", action.name);
@@ -1607,7 +1621,13 @@ function CopilotDevConsole() {
1607
1621
  setVersionStatus("checking");
1608
1622
  getPublishedCopilotKitVersion(currentVersion, force).then((v) => {
1609
1623
  setLatestVersion(v.latest);
1610
- if (v.current === v.latest || /[a-zA-Z]/.test(v.current)) {
1624
+ let versionOk = false;
1625
+ if (v.current === v.latest) {
1626
+ versionOk = true;
1627
+ } else if (/[a-zA-Z]/.test(v.current)) {
1628
+ versionOk = true;
1629
+ }
1630
+ if (versionOk) {
1611
1631
  setVersionStatus("latest");
1612
1632
  } else if (v.severity !== "low") {
1613
1633
  setVersionStatus("outdated");