@copilotkit/react-ui 1.3.12 → 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 +20 -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,20 +1,20 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "../../chunk-47OPG5FM.mjs";
3
+ } from "../../chunk-3EYL2DRG.mjs";
4
4
  import "../../chunk-YAGE7RCE.mjs";
5
5
  import "../../chunk-VEC45H6Q.mjs";
6
6
  import "../../chunk-RQNJNK2W.mjs";
7
- import "../../chunk-3KBQXU44.mjs";
7
+ import "../../chunk-NLIDKNNS.mjs";
8
8
  import "../../chunk-V7W6IM2V.mjs";
9
- import "../../chunk-6BL5C56L.mjs";
9
+ import "../../chunk-OMTPWC7T.mjs";
10
10
  import "../../chunk-ZABXREBH.mjs";
11
11
  import "../../chunk-6INMITFA.mjs";
12
- import "../../chunk-WYMTXCQU.mjs";
13
- import "../../chunk-KFQYJ5R5.mjs";
12
+ import "../../chunk-RU73BEZM.mjs";
13
+ import "../../chunk-RJCZRKTV.mjs";
14
14
  import "../../chunk-RS6UPR5N.mjs";
15
15
  import "../../chunk-4FIGRRFS.mjs";
16
16
  import "../../chunk-OTPAZXVR.mjs";
17
- import "../../chunk-JTINVYPK.mjs";
17
+ import "../../chunk-4LUMV4YO.mjs";
18
18
  import "../../chunk-YQFVRDNC.mjs";
19
19
  import "../../chunk-YQ3D5IQV.mjs";
20
20
  import "../../chunk-CPMIEVKK.mjs";
@@ -856,7 +856,16 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
856
856
  children: context.icons.pushToTalkIcon
857
857
  }
858
858
  ),
859
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { disabled: sendDisabled, onClick: send, children: sendIcon })
859
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
860
+ "button",
861
+ {
862
+ disabled: sendDisabled,
863
+ onClick: send,
864
+ "data-copilotkit-in-progress": !!inProgress,
865
+ "data-testid": inProgress ? "copilot-chat-request-in-progress" : void 0,
866
+ children: sendIcon
867
+ }
868
+ )
860
869
  ] })
861
870
  ] });
862
871
  };
@@ -1346,9 +1355,25 @@ function RenderTextMessage(props) {
1346
1355
  const { icons } = useChatContext();
1347
1356
  if (message.isTextMessage()) {
1348
1357
  if (message.role === "user") {
1349
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "copilotKitMessage copilotKitUserMessage", children: message.content }, index);
1358
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1359
+ "div",
1360
+ {
1361
+ "data-message-role": "user",
1362
+ className: "copilotKitMessage copilotKitUserMessage",
1363
+ children: message.content
1364
+ },
1365
+ index
1366
+ );
1350
1367
  } else if (message.role == "assistant") {
1351
- 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);
1368
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1369
+ "div",
1370
+ {
1371
+ "data-message-role": "assistant",
1372
+ className: `copilotKitMessage copilotKitAssistantMessage`,
1373
+ children: isCurrentMessage && inProgress && !message.content ? icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message.content })
1374
+ },
1375
+ index
1376
+ );
1352
1377
  }
1353
1378
  }
1354
1379
  }
@@ -1398,7 +1423,15 @@ function RenderActionExecutionMessage(props) {
1398
1423
  toRender
1399
1424
  ] }, index);
1400
1425
  } else {
1401
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
1426
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1427
+ "div",
1428
+ {
1429
+ "data-message-type": "action-render",
1430
+ className: "copilotKitCustomAssistantMessage",
1431
+ children: toRender
1432
+ },
1433
+ index
1434
+ );
1402
1435
  }
1403
1436
  } catch (e) {
1404
1437
  console.error(`Error executing render function for action ${message.name}: ${e}`);
@@ -1525,8 +1558,8 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
1525
1558
  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.`;
1526
1559
  const result = yield (0, import_react_core5.extract)({
1527
1560
  context,
1528
- instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. " + config.instructions + "\n\n" + numOfSuggestionsInstructions,
1529
- data: "Available tools: " + tools + "\n\n",
1561
+ instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. ",
1562
+ data: config.instructions + "\n\n" + numOfSuggestionsInstructions + "\n\nAvailable tools: " + tools + "\n\n",
1530
1563
  requestType: import_runtime_client_gql3.CopilotRequestType.Task,
1531
1564
  parameters: [
1532
1565
  {