@copilotkit/react-ui 1.1.2 → 1.1.3-feat-runtime-remote-actions.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 (117) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +32 -37
  3. package/dist/{chunk-UJHTRHS4.mjs → chunk-36OL6SEM.mjs} +3 -2
  4. package/dist/chunk-36OL6SEM.mjs.map +1 -0
  5. package/dist/{chunk-EJ4SJ2HU.mjs → chunk-AFD5I7MW.mjs} +2 -2
  6. package/dist/chunk-AFD5I7MW.mjs.map +1 -0
  7. package/dist/{chunk-WOPUCUQK.mjs → chunk-C534T3DM.mjs} +10 -11
  8. package/dist/{chunk-WOPUCUQK.mjs.map → chunk-C534T3DM.mjs.map} +1 -1
  9. package/dist/{chunk-SE6DAYSX.mjs → chunk-FLV3J3VX.mjs} +5 -5
  10. package/dist/chunk-FLV3J3VX.mjs.map +1 -0
  11. package/dist/{chunk-LLOSOTAT.mjs → chunk-FO7Z5LAL.mjs} +6 -3
  12. package/dist/chunk-FO7Z5LAL.mjs.map +1 -0
  13. package/dist/{chunk-4Z2WDXSK.mjs → chunk-FOZVHL73.mjs} +49 -4
  14. package/dist/chunk-FOZVHL73.mjs.map +1 -0
  15. package/dist/{chunk-PF5HUDUP.mjs → chunk-H7TM5JE6.mjs} +54 -2
  16. package/dist/chunk-H7TM5JE6.mjs.map +1 -0
  17. package/dist/{chunk-SWWFXRFF.mjs → chunk-HR36Y2FQ.mjs} +4 -4
  18. package/dist/chunk-HR36Y2FQ.mjs.map +1 -0
  19. package/dist/{chunk-D6QNFZXK.mjs → chunk-I4QG2ZZU.mjs} +4 -2
  20. package/dist/chunk-I4QG2ZZU.mjs.map +1 -0
  21. package/dist/{chunk-KSCXPA74.mjs → chunk-WCPLXRZX.mjs} +1 -1
  22. package/dist/chunk-WCPLXRZX.mjs.map +1 -0
  23. package/dist/{chunk-UC3Y7MWX.mjs → chunk-YOH25I6N.mjs} +5 -5
  24. package/dist/chunk-YOH25I6N.mjs.map +1 -0
  25. package/dist/components/chat/Button.d.ts +2 -1
  26. package/dist/components/chat/Button.js +4 -4
  27. package/dist/components/chat/Button.js.map +1 -1
  28. package/dist/components/chat/Button.mjs +1 -1
  29. package/dist/components/chat/Chat.d.ts +4 -49
  30. package/dist/components/chat/Chat.js +101 -5
  31. package/dist/components/chat/Chat.js.map +1 -1
  32. package/dist/components/chat/Chat.mjs +5 -5
  33. package/dist/components/chat/ChatContext.d.ts +2 -1
  34. package/dist/components/chat/Header.d.ts +2 -1
  35. package/dist/components/chat/Header.js +4 -4
  36. package/dist/components/chat/Header.js.map +1 -1
  37. package/dist/components/chat/Header.mjs +1 -1
  38. package/dist/components/chat/Icons.d.ts +14 -13
  39. package/dist/components/chat/Input.d.ts +2 -1
  40. package/dist/components/chat/Markdown.d.ts +3 -1
  41. package/dist/components/chat/Messages.d.ts +2 -1
  42. package/dist/components/chat/Messages.js +46 -2
  43. package/dist/components/chat/Messages.js.map +1 -1
  44. package/dist/components/chat/Messages.mjs +1 -1
  45. package/dist/components/chat/Modal.d.ts +2 -1
  46. package/dist/components/chat/Modal.js +114 -20
  47. package/dist/components/chat/Modal.js.map +1 -1
  48. package/dist/components/chat/Modal.mjs +9 -9
  49. package/dist/components/chat/Popup.d.ts +2 -48
  50. package/dist/components/chat/Popup.js +114 -20
  51. package/dist/components/chat/Popup.js.map +1 -1
  52. package/dist/components/chat/Popup.mjs +10 -10
  53. package/dist/components/chat/Response.d.ts +2 -1
  54. package/dist/components/chat/Sidebar.d.ts +2 -1
  55. package/dist/components/chat/Sidebar.js +115 -20
  56. package/dist/components/chat/Sidebar.js.map +1 -1
  57. package/dist/components/chat/Sidebar.mjs +10 -10
  58. package/dist/components/chat/Suggestion.d.ts +2 -1
  59. package/dist/components/chat/Suggestion.js.map +1 -1
  60. package/dist/components/chat/Suggestion.mjs +1 -1
  61. package/dist/components/chat/Window.d.ts +2 -1
  62. package/dist/components/chat/Window.js +23 -8
  63. package/dist/components/chat/Window.js.map +1 -1
  64. package/dist/components/chat/Window.mjs +3 -1
  65. package/dist/components/chat/index.d.ts +1 -0
  66. package/dist/components/chat/index.js +115 -20
  67. package/dist/components/chat/index.js.map +1 -1
  68. package/dist/components/chat/index.mjs +11 -11
  69. package/dist/components/chat/props.d.ts +0 -6
  70. package/dist/components/chat/props.js.map +1 -1
  71. package/dist/components/dev-console/console.d.ts +4 -2
  72. package/dist/components/dev-console/console.js +52 -0
  73. package/dist/components/dev-console/console.js.map +1 -1
  74. package/dist/components/dev-console/console.mjs +2 -2
  75. package/dist/components/dev-console/icons.d.ts +7 -5
  76. package/dist/components/dev-console/index.d.ts +1 -0
  77. package/dist/components/dev-console/index.js +52 -0
  78. package/dist/components/dev-console/index.js.map +1 -1
  79. package/dist/components/dev-console/index.mjs +2 -2
  80. package/dist/components/dev-console/utils.d.ts +2 -1
  81. package/dist/components/dev-console/utils.js +53 -0
  82. package/dist/components/dev-console/utils.js.map +1 -1
  83. package/dist/components/dev-console/utils.mjs +3 -1
  84. package/dist/components/index.d.ts +1 -0
  85. package/dist/components/index.js +115 -20
  86. package/dist/components/index.js.map +1 -1
  87. package/dist/components/index.mjs +11 -11
  88. package/dist/index.css +5 -4
  89. package/dist/index.css.map +1 -1
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.js +115 -20
  92. package/dist/index.js.map +1 -1
  93. package/dist/index.mjs +11 -11
  94. package/package.json +8 -8
  95. package/src/components/chat/Button.tsx +4 -8
  96. package/src/components/chat/Chat.tsx +2 -1
  97. package/src/components/chat/Header.tsx +4 -4
  98. package/src/components/chat/Messages.tsx +83 -2
  99. package/src/components/chat/Modal.tsx +4 -5
  100. package/src/components/chat/Popup.tsx +1 -0
  101. package/src/components/chat/Sidebar.tsx +2 -0
  102. package/src/components/chat/Suggestion.tsx +2 -0
  103. package/src/components/chat/Window.tsx +3 -2
  104. package/src/components/chat/props.ts +2 -10
  105. package/src/components/dev-console/console.tsx +6 -0
  106. package/src/components/dev-console/utils.ts +56 -0
  107. package/src/css/markdown.css +5 -5
  108. package/dist/chunk-4Z2WDXSK.mjs.map +0 -1
  109. package/dist/chunk-D6QNFZXK.mjs.map +0 -1
  110. package/dist/chunk-EJ4SJ2HU.mjs.map +0 -1
  111. package/dist/chunk-KSCXPA74.mjs.map +0 -1
  112. package/dist/chunk-LLOSOTAT.mjs.map +0 -1
  113. package/dist/chunk-PF5HUDUP.mjs.map +0 -1
  114. package/dist/chunk-SE6DAYSX.mjs.map +0 -1
  115. package/dist/chunk-SWWFXRFF.mjs.map +0 -1
  116. package/dist/chunk-UC3Y7MWX.mjs.map +0 -1
  117. package/dist/chunk-UJHTRHS4.mjs.map +0 -1
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "../../chunk-WOPUCUQK.mjs";
4
- import "../../chunk-LLOSOTAT.mjs";
5
- import "../../chunk-SE6DAYSX.mjs";
6
- import "../../chunk-UC3Y7MWX.mjs";
7
- import "../../chunk-SWWFXRFF.mjs";
3
+ } from "../../chunk-C534T3DM.mjs";
4
+ import "../../chunk-FO7Z5LAL.mjs";
5
+ import "../../chunk-FLV3J3VX.mjs";
6
+ import "../../chunk-YOH25I6N.mjs";
7
+ import "../../chunk-HR36Y2FQ.mjs";
8
8
  import "../../chunk-V7W6IM2V.mjs";
9
- import "../../chunk-KSCXPA74.mjs";
10
- import "../../chunk-D6QNFZXK.mjs";
11
- import "../../chunk-PF5HUDUP.mjs";
9
+ import "../../chunk-WCPLXRZX.mjs";
10
+ import "../../chunk-I4QG2ZZU.mjs";
11
+ import "../../chunk-H7TM5JE6.mjs";
12
12
  import "../../chunk-OTPAZXVR.mjs";
13
13
  import "../../chunk-U6J5DGOE.mjs";
14
14
  import "../../chunk-YQFVRDNC.mjs";
15
- import "../../chunk-4Z2WDXSK.mjs";
15
+ import "../../chunk-FOZVHL73.mjs";
16
16
  import "../../chunk-YQ3D5IQV.mjs";
17
17
  import "../../chunk-XSUSSWDS.mjs";
18
18
  import "../../chunk-BJPGMY3I.mjs";
@@ -1,3 +1,4 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { CopilotModalProps } from './Modal.js';
2
3
  import 'react';
3
4
  import './props.js';
@@ -7,53 +8,6 @@ import './ChatContext.js';
7
8
  import '@copilotkit/react-core';
8
9
  import '../../types/suggestions.js';
9
10
 
10
- /**
11
- * <br/>
12
- * <img src="/images/CopilotPopup.gif" width="500" />
13
- *
14
- * A chatbot popup component for the CopilotKit framework. The component allows for a high degree
15
- * of customization through various props and custom CSS.
16
- *
17
- * See [CopilotSidebar](/reference/components/CopilotSidebar) for a sidebar version of this component.
18
- *
19
- * ## Install Dependencies
20
- *
21
- * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.
22
- *
23
- * ```shell npm2yarn \"@copilotkit/react-ui"\
24
- * npm install @copilotkit/react-core @copilotkit/react-ui
25
- * ```
26
- * ## Usage
27
- *
28
- * ```tsx
29
- * import { CopilotPopup } from "@copilotkit/react-ui";
30
- *
31
- * <CopilotPopup
32
- * labels={{
33
- * title: "Your Assistant",
34
- * initial: "Hi! 👋 How can I assist you today?",
35
- * }}
36
- * />
37
- * ```
38
- *
39
- * ### Look & Feel
40
- *
41
- * By default, CopilotKit components do not have any styles. You can import CopilotKit's stylesheet at the root of your project:
42
- * ```tsx fileName="YourRootComponent.tsx" {2}
43
- * ...
44
- * import "@copilotkit/react-ui/styles.css";
45
- *
46
- * export function YourRootComponent() {
47
- * return (
48
- * <CopilotKit>
49
- * ...
50
- * </CopilotKit>
51
- * );
52
- * }
53
- * ```
54
- * For more information about how to customize the styles, check out the [Customize Look & Feel](/concepts/customize-look-and-feel) guide.
55
- */
56
-
57
- declare function CopilotPopup(props: CopilotModalProps): JSX.Element;
11
+ declare function CopilotPopup(props: CopilotModalProps): react_jsx_runtime.JSX.Element;
58
12
 
59
13
  export { CopilotPopup };
@@ -381,14 +381,13 @@ var ChatContextProvider = ({
381
381
  var import_react2 = __toESM(require("react"));
382
382
  var import_jsx_runtime3 = require("react/jsx-runtime");
383
383
  var Window = ({
384
- open,
385
- setOpen,
386
384
  children,
387
385
  clickOutsideToClose,
388
386
  shortcut,
389
387
  hitEscapeToClose
390
388
  }) => {
391
389
  const windowRef = import_react2.default.useRef(null);
390
+ const { open, setOpen } = useChatContext();
392
391
  const handleClickOutside = (0, import_react2.useCallback)(
393
392
  (event) => {
394
393
  var _a;
@@ -490,16 +489,16 @@ function isMacOS() {
490
489
 
491
490
  // src/components/chat/Button.tsx
492
491
  var import_jsx_runtime4 = require("react/jsx-runtime");
493
- var Button = ({ open, setOpen }) => {
494
- const context = useChatContext();
492
+ var Button = ({}) => {
493
+ const { open, setOpen, icons } = useChatContext();
495
494
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { onClick: () => setOpen(!open), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
496
495
  "button",
497
496
  {
498
497
  className: `copilotKitButton ${open ? "open" : ""}`,
499
498
  "aria-label": open ? "Close Chat" : "Open Chat",
500
499
  children: [
501
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children: context.icons.openIcon }),
502
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children: context.icons.closeIcon })
500
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children: icons.openIcon }),
501
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children: icons.closeIcon })
503
502
  ]
504
503
  }
505
504
  ) });
@@ -507,11 +506,11 @@ var Button = ({ open, setOpen }) => {
507
506
 
508
507
  // src/components/chat/Header.tsx
509
508
  var import_jsx_runtime5 = require("react/jsx-runtime");
510
- var Header = ({ setOpen }) => {
511
- const context = useChatContext();
509
+ var Header = ({}) => {
510
+ const { setOpen, icons, labels } = useChatContext();
512
511
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "copilotKitHeader", children: [
513
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: context.labels.title }),
514
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: () => setOpen(false), "aria-label": "Close", children: context.icons.headerCloseIcon })
512
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: labels.title }),
513
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: () => setOpen(false), "aria-label": "Close", children: icons.headerCloseIcon })
515
514
  ] });
516
515
  };
517
516
 
@@ -1029,8 +1028,8 @@ var Messages = ({ messages, inProgress, children }) => {
1029
1028
  } else if (message instanceof import_runtime_client_gql.TextMessage && message.role == "assistant") {
1030
1029
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: isCurrentMessage && inProgress && !message.content ? context.icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Markdown, { content: message.content }) }, index);
1031
1030
  } else if (message instanceof import_runtime_client_gql.ActionExecutionMessage) {
1032
- if (chatComponentsCache.current !== null && chatComponentsCache.current[message.name]) {
1033
- const render = chatComponentsCache.current[message.name];
1031
+ if (chatComponentsCache.current !== null && chatComponentsCache.current.actions[message.name]) {
1032
+ const render = chatComponentsCache.current.actions[message.name];
1034
1033
  if (typeof render === "string") {
1035
1034
  if (isCurrentMessage && inProgress) {
1036
1035
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
@@ -1072,6 +1071,50 @@ var Messages = ({ messages, inProgress, children }) => {
1072
1071
  } else {
1073
1072
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
1074
1073
  }
1074
+ } else if (message instanceof import_runtime_client_gql.AgentStateMessage) {
1075
+ let render;
1076
+ if (chatComponentsCache.current !== null) {
1077
+ render = chatComponentsCache.current.coagentActions[`${message.agentName}-${message.nodeName}`] || chatComponentsCache.current.coagentActions[`${message.agentName}-global`];
1078
+ }
1079
+ if (render) {
1080
+ if (typeof render === "string") {
1081
+ if (isCurrentMessage && inProgress) {
1082
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
1083
+ context.icons.spinnerIcon,
1084
+ " ",
1085
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "inProgressLabel", children: render })
1086
+ ] }, index);
1087
+ } else {
1088
+ return null;
1089
+ }
1090
+ } else {
1091
+ const state = message.state;
1092
+ let status = message.active ? "inProgress" : "complete";
1093
+ const toRender = render({
1094
+ status,
1095
+ state,
1096
+ nodeName: message.nodeName
1097
+ });
1098
+ if (!toRender && status === "complete") {
1099
+ return null;
1100
+ }
1101
+ if (typeof toRender === "string") {
1102
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
1103
+ isCurrentMessage && inProgress && context.icons.spinnerIcon,
1104
+ " ",
1105
+ toRender
1106
+ ] }, index);
1107
+ } else {
1108
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
1109
+ }
1110
+ }
1111
+ } else if (!inProgress || !isCurrentMessage) {
1112
+ return null;
1113
+ } else {
1114
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
1115
+ }
1116
+ } else if (message instanceof import_runtime_client_gql.ResultMessage && inProgress && isCurrentMessage) {
1117
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
1075
1118
  }
1076
1119
  }),
1077
1120
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("footer", { ref: messagesEndRef, children })
@@ -1422,11 +1465,13 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
1422
1465
  // src/components/chat/Chat.tsx
1423
1466
  var import_react11 = __toESM(require("react"));
1424
1467
  var import_react_core7 = require("@copilotkit/react-core");
1425
- var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
1468
+ var import_runtime_client_gql6 = require("@copilotkit/runtime-client-gql");
1426
1469
  var import_shared3 = require("@copilotkit/shared");
1427
1470
 
1428
1471
  // src/components/dev-console/utils.ts
1429
1472
  var import_react_core5 = require("@copilotkit/react-core");
1473
+ var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
1474
+ var import_runtime_client_gql5 = require("@copilotkit/runtime-client-gql");
1430
1475
  function shouldShowDevConsole(showDevConsole) {
1431
1476
  if (typeof showDevConsole === "boolean") {
1432
1477
  return showDevConsole;
@@ -1487,6 +1532,7 @@ function getPublishedCopilotKitVersion(current, forceCheck = false) {
1487
1532
  });
1488
1533
  }
1489
1534
  function logReadables(context) {
1535
+ console.log("%cCurrent Readables:", "font-size: 16px; font-weight: bold;");
1490
1536
  const readables = context.getContextString([], import_react_core5.defaultCopilotContextCategories).trim();
1491
1537
  if (readables.length === 0) {
1492
1538
  console.log("No readables found");
@@ -1495,6 +1541,7 @@ function logReadables(context) {
1495
1541
  console.log(readables);
1496
1542
  }
1497
1543
  function logActions(context) {
1544
+ console.log("%cCurrent Actions:", "font-size: 16px; font-weight: bold;");
1498
1545
  if (Object.values(context.actions).length === 0) {
1499
1546
  console.log("No actions found");
1500
1547
  return;
@@ -1507,6 +1554,53 @@ function logActions(context) {
1507
1554
  console.groupEnd();
1508
1555
  }
1509
1556
  }
1557
+ function logMessages(context) {
1558
+ console.log("%cCurrent Messages:", "font-size: 16px; font-weight: bold;");
1559
+ if (context.messages.length === 0) {
1560
+ console.log("No messages found");
1561
+ return;
1562
+ }
1563
+ const tableData = context.messages.map((message) => {
1564
+ if (message instanceof import_runtime_client_gql4.TextMessage) {
1565
+ return {
1566
+ id: message.id,
1567
+ type: "TextMessage",
1568
+ role: message.role,
1569
+ name: void 0,
1570
+ scope: void 0,
1571
+ content: message.content
1572
+ };
1573
+ } else if (message instanceof import_runtime_client_gql4.ActionExecutionMessage) {
1574
+ return {
1575
+ id: message.id,
1576
+ type: "ActionExecutionMessage",
1577
+ role: void 0,
1578
+ name: message.name,
1579
+ scope: message.scope,
1580
+ content: message.arguments
1581
+ };
1582
+ } else if (message instanceof import_runtime_client_gql4.ResultMessage) {
1583
+ return {
1584
+ id: message.id,
1585
+ type: "ResultMessage",
1586
+ role: void 0,
1587
+ name: message.actionName,
1588
+ scope: message.actionExecutionId,
1589
+ content: message.result
1590
+ };
1591
+ } else if (message instanceof import_runtime_client_gql5.AgentStateMessage) {
1592
+ return {
1593
+ id: message.id,
1594
+ type: `AgentStateMessage (running: ${message.running})`,
1595
+ role: message.role,
1596
+ name: void 0,
1597
+ scope: message.threadId,
1598
+ content: message.state
1599
+ };
1600
+ }
1601
+ });
1602
+ console.table(tableData);
1603
+ }
1510
1604
 
1511
1605
  // src/components/dev-console/console.tsx
1512
1606
  var import_react_core6 = require("@copilotkit/react-core");
@@ -1781,6 +1875,7 @@ function DebugMenuButton({
1781
1875
  children: [
1782
1876
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logReadables(context), children: "Log Readables" }) }),
1783
1877
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logActions(context), children: "Log Actions" }) }),
1878
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logMessages(context), children: "Log Messages" }) }),
1784
1879
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => checkForUpdates(true), children: "Check for Updates" }) }),
1785
1880
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", {}),
1786
1881
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => setShowDevConsole(false), children: "Hide Dev Console" }) })
@@ -1899,9 +1994,9 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
1899
1994
  const sendMessage = (messageContent) => __async(void 0, null, function* () {
1900
1995
  abortSuggestions();
1901
1996
  setCurrentSuggestions([]);
1902
- const message = new import_runtime_client_gql4.TextMessage({
1997
+ const message = new import_runtime_client_gql6.TextMessage({
1903
1998
  content: messageContent,
1904
- role: import_runtime_client_gql4.Role.User
1999
+ role: import_runtime_client_gql6.Role.User
1905
2000
  });
1906
2001
  appendMessage(message);
1907
2002
  if (onSubmitMessage) {
@@ -1949,23 +2044,22 @@ var CopilotModal = ({
1949
2044
  }) => {
1950
2045
  const [openState, setOpenState] = import_react12.default.useState(defaultOpen);
1951
2046
  const setOpen = (open) => {
2047
+ console.log("setOpen!!", open);
1952
2048
  onSetOpen == null ? void 0 : onSetOpen(open);
1953
2049
  setOpenState(open);
1954
2050
  };
1955
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ChatContextProvider, { icons, labels, open: openState, setOpen: setOpenState, children: [
2051
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ChatContextProvider, { icons, labels, open: openState, setOpen, children: [
1956
2052
  children,
1957
2053
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className, children: [
1958
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button2, { open: openState, setOpen }),
2054
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button2, {}),
1959
2055
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1960
2056
  Window2,
1961
2057
  {
1962
- open: openState,
1963
- setOpen,
1964
2058
  clickOutsideToClose,
1965
2059
  shortcut,
1966
2060
  hitEscapeToClose,
1967
2061
  children: [
1968
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Header2, { open: openState, setOpen }),
2062
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Header2, {}),
1969
2063
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1970
2064
  CopilotChat,
1971
2065
  {