@copilotkit/react-ui 1.3.13 → 1.3.14-feat-langgraph-cloud.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 (59) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{chunk-47OPG5FM.mjs → chunk-3EYL2DRG.mjs} +3 -3
  3. package/dist/{chunk-KCAVDFB6.mjs → chunk-3JNDMHS4.mjs} +2 -2
  4. package/dist/{chunk-JTINVYPK.mjs → chunk-4LUMV4YO.mjs} +11 -2
  5. package/dist/{chunk-JTINVYPK.mjs.map → chunk-4LUMV4YO.mjs.map} +1 -1
  6. package/dist/{chunk-SWADR6EH.mjs → chunk-AX7CAT7V.mjs} +2 -2
  7. package/dist/{chunk-3KBQXU44.mjs → chunk-NLIDKNNS.mjs} +5 -5
  8. package/dist/{chunk-6BL5C56L.mjs → chunk-OMTPWC7T.mjs} +10 -2
  9. package/dist/chunk-OMTPWC7T.mjs.map +1 -0
  10. package/dist/{chunk-KFQYJ5R5.mjs → chunk-RJCZRKTV.mjs} +3 -3
  11. package/dist/chunk-RJCZRKTV.mjs.map +1 -0
  12. package/dist/chunk-RU73BEZM.mjs +41 -0
  13. package/dist/chunk-RU73BEZM.mjs.map +1 -0
  14. package/dist/components/chat/Chat.js +39 -6
  15. package/dist/components/chat/Chat.js.map +1 -1
  16. package/dist/components/chat/Chat.mjs +5 -5
  17. package/dist/components/chat/Input.js +10 -1
  18. package/dist/components/chat/Input.js.map +1 -1
  19. package/dist/components/chat/Input.mjs +1 -1
  20. package/dist/components/chat/Modal.js +39 -6
  21. package/dist/components/chat/Modal.js.map +1 -1
  22. package/dist/components/chat/Modal.mjs +6 -6
  23. package/dist/components/chat/Popup.js +39 -6
  24. package/dist/components/chat/Popup.js.map +1 -1
  25. package/dist/components/chat/Popup.mjs +7 -7
  26. package/dist/components/chat/Sidebar.js +39 -6
  27. package/dist/components/chat/Sidebar.js.map +1 -1
  28. package/dist/components/chat/Sidebar.mjs +7 -7
  29. package/dist/components/chat/Suggestion.js +2 -2
  30. package/dist/components/chat/Suggestion.js.map +1 -1
  31. package/dist/components/chat/Suggestion.mjs +1 -1
  32. package/dist/components/chat/index.js +39 -6
  33. package/dist/components/chat/index.js.map +1 -1
  34. package/dist/components/chat/index.mjs +8 -8
  35. package/dist/components/chat/messages/RenderActionExecutionMessage.js +9 -1
  36. package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
  37. package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +1 -1
  38. package/dist/components/chat/messages/RenderTextMessage.js +18 -2
  39. package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
  40. package/dist/components/chat/messages/RenderTextMessage.mjs +1 -1
  41. package/dist/components/index.js +39 -6
  42. package/dist/components/index.js.map +1 -1
  43. package/dist/components/index.mjs +8 -8
  44. package/dist/index.js +39 -6
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.mjs +8 -8
  47. package/package.json +7 -7
  48. package/src/components/chat/Input.tsx +6 -1
  49. package/src/components/chat/Suggestion.tsx +7 -3
  50. package/src/components/chat/messages/RenderActionExecutionMessage.tsx +5 -1
  51. package/src/components/chat/messages/RenderTextMessage.tsx +10 -2
  52. package/dist/chunk-6BL5C56L.mjs.map +0 -1
  53. package/dist/chunk-KFQYJ5R5.mjs.map +0 -1
  54. package/dist/chunk-WYMTXCQU.mjs +0 -25
  55. package/dist/chunk-WYMTXCQU.mjs.map +0 -1
  56. /package/dist/{chunk-47OPG5FM.mjs.map → chunk-3EYL2DRG.mjs.map} +0 -0
  57. /package/dist/{chunk-KCAVDFB6.mjs.map → chunk-3JNDMHS4.mjs.map} +0 -0
  58. /package/dist/{chunk-SWADR6EH.mjs.map → chunk-AX7CAT7V.mjs.map} +0 -0
  59. /package/dist/{chunk-3KBQXU44.mjs.map → chunk-NLIDKNNS.mjs.map} +0 -0
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  CopilotPopup
3
- } from "../../chunk-SWADR6EH.mjs";
4
- import "../../chunk-47OPG5FM.mjs";
3
+ } from "../../chunk-AX7CAT7V.mjs";
4
+ import "../../chunk-3EYL2DRG.mjs";
5
5
  import "../../chunk-YAGE7RCE.mjs";
6
6
  import "../../chunk-VEC45H6Q.mjs";
7
7
  import "../../chunk-RQNJNK2W.mjs";
8
- import "../../chunk-3KBQXU44.mjs";
8
+ import "../../chunk-NLIDKNNS.mjs";
9
9
  import "../../chunk-V7W6IM2V.mjs";
10
- import "../../chunk-6BL5C56L.mjs";
10
+ import "../../chunk-OMTPWC7T.mjs";
11
11
  import "../../chunk-ZABXREBH.mjs";
12
12
  import "../../chunk-6INMITFA.mjs";
13
- import "../../chunk-WYMTXCQU.mjs";
14
- import "../../chunk-KFQYJ5R5.mjs";
13
+ import "../../chunk-RU73BEZM.mjs";
14
+ import "../../chunk-RJCZRKTV.mjs";
15
15
  import "../../chunk-RS6UPR5N.mjs";
16
16
  import "../../chunk-4FIGRRFS.mjs";
17
17
  import "../../chunk-OTPAZXVR.mjs";
18
- import "../../chunk-JTINVYPK.mjs";
18
+ import "../../chunk-4LUMV4YO.mjs";
19
19
  import "../../chunk-YQFVRDNC.mjs";
20
20
  import "../../chunk-YQ3D5IQV.mjs";
21
21
  import "../../chunk-CPMIEVKK.mjs";
@@ -857,7 +857,16 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
857
857
  children: context.icons.pushToTalkIcon
858
858
  }
859
859
  ),
860
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { disabled: sendDisabled, onClick: send, children: sendIcon })
860
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
861
+ "button",
862
+ {
863
+ disabled: sendDisabled,
864
+ onClick: send,
865
+ "data-copilotkit-in-progress": !!inProgress,
866
+ "data-testid": inProgress ? "copilot-chat-request-in-progress" : void 0,
867
+ children: sendIcon
868
+ }
869
+ )
861
870
  ] })
862
871
  ] });
863
872
  };
@@ -1347,9 +1356,25 @@ function RenderTextMessage(props) {
1347
1356
  const { icons } = useChatContext();
1348
1357
  if (message.isTextMessage()) {
1349
1358
  if (message.role === "user") {
1350
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "copilotKitMessage copilotKitUserMessage", children: message.content }, index);
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1360
+ "div",
1361
+ {
1362
+ "data-message-role": "user",
1363
+ className: "copilotKitMessage copilotKitUserMessage",
1364
+ children: message.content
1365
+ },
1366
+ index
1367
+ );
1351
1368
  } else if (message.role == "assistant") {
1352
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: isCurrentMessage && inProgress && !message.content ? icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message.content }) }, index);
1369
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1370
+ "div",
1371
+ {
1372
+ "data-message-role": "assistant",
1373
+ className: `copilotKitMessage copilotKitAssistantMessage`,
1374
+ children: isCurrentMessage && inProgress && !message.content ? icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message.content })
1375
+ },
1376
+ index
1377
+ );
1353
1378
  }
1354
1379
  }
1355
1380
  }
@@ -1399,7 +1424,15 @@ function RenderActionExecutionMessage(props) {
1399
1424
  toRender
1400
1425
  ] }, index);
1401
1426
  } else {
1402
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
1427
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1428
+ "div",
1429
+ {
1430
+ "data-message-type": "action-render",
1431
+ className: "copilotKitCustomAssistantMessage",
1432
+ children: toRender
1433
+ },
1434
+ index
1435
+ );
1403
1436
  }
1404
1437
  } catch (e) {
1405
1438
  console.error(`Error executing render function for action ${message.name}: ${e}`);
@@ -1526,8 +1559,8 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
1526
1559
  const numOfSuggestionsInstructions = config.minSuggestions === 0 ? `Produce up to ${config.maxSuggestions} suggestions. If there are no highly relevant suggestions you can think of, provide an empty array.` : `Produce between ${config.minSuggestions} and ${config.maxSuggestions} suggestions.`;
1527
1560
  const result = yield (0, import_react_core5.extract)({
1528
1561
  context,
1529
- instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. " + config.instructions + "\n\n" + numOfSuggestionsInstructions,
1530
- data: "Available tools: " + tools + "\n\n",
1562
+ instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. ",
1563
+ data: config.instructions + "\n\n" + numOfSuggestionsInstructions + "\n\nAvailable tools: " + tools + "\n\n",
1531
1564
  requestType: import_runtime_client_gql3.CopilotRequestType.Task,
1532
1565
  parameters: [
1533
1566
  {