@copilotkit/react-ui 1.50.0-beta.7 → 1.50.0-beta.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 (67) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/dist/{chunk-6PL5IKAT.mjs → chunk-4APTIMH3.mjs} +2 -2
  3. package/dist/{chunk-GASWCRI7.mjs → chunk-7OURDQZJ.mjs} +2 -2
  4. package/dist/{chunk-GDSZGYCE.mjs → chunk-B4EBCYMS.mjs} +4 -4
  5. package/dist/{chunk-IOZL5AMG.mjs → chunk-ETQOY3FA.mjs} +7 -7
  6. package/dist/{chunk-FFJHOZX6.mjs → chunk-FKJWIQGB.mjs} +9 -9
  7. package/dist/{chunk-YJ45UASA.mjs → chunk-HIW7RXCD.mjs} +2 -2
  8. package/dist/{chunk-U2EHC4KT.mjs → chunk-I2YM5J5H.mjs} +2 -2
  9. package/dist/{chunk-SF5OH7KP.mjs → chunk-LG6H5CG5.mjs} +4 -4
  10. package/dist/{chunk-VBYQQ5JS.mjs → chunk-NCIAFFQ2.mjs} +3 -1
  11. package/dist/{chunk-VBYQQ5JS.mjs.map → chunk-NCIAFFQ2.mjs.map} +1 -1
  12. package/dist/{chunk-3W6J75HS.mjs → chunk-SABFRQEH.mjs} +4 -4
  13. package/dist/{chunk-OYRZ4VLU.mjs → chunk-Y4FKRAKJ.mjs} +3 -3
  14. package/dist/{chunk-OYRZ4VLU.mjs.map → chunk-Y4FKRAKJ.mjs.map} +1 -1
  15. package/dist/components/chat/Chat.js +2 -0
  16. package/dist/components/chat/Chat.js.map +1 -1
  17. package/dist/components/chat/Chat.mjs +6 -6
  18. package/dist/components/chat/Header.mjs +5 -5
  19. package/dist/components/chat/Input.mjs +2 -2
  20. package/dist/components/chat/Messages.js +2 -0
  21. package/dist/components/chat/Messages.js.map +1 -1
  22. package/dist/components/chat/Messages.mjs +3 -3
  23. package/dist/components/chat/Modal.js +2 -0
  24. package/dist/components/chat/Modal.js.map +1 -1
  25. package/dist/components/chat/Modal.mjs +15 -15
  26. package/dist/components/chat/Popup.js +2 -0
  27. package/dist/components/chat/Popup.js.map +1 -1
  28. package/dist/components/chat/Popup.mjs +16 -16
  29. package/dist/components/chat/Sidebar.js +2 -0
  30. package/dist/components/chat/Sidebar.js.map +1 -1
  31. package/dist/components/chat/Sidebar.mjs +16 -16
  32. package/dist/components/chat/index.js +2 -0
  33. package/dist/components/chat/index.js.map +1 -1
  34. package/dist/components/chat/index.mjs +17 -17
  35. package/dist/components/chat/messages/LegacyRenderMessage.js +2 -0
  36. package/dist/components/chat/messages/LegacyRenderMessage.js.map +1 -1
  37. package/dist/components/chat/messages/LegacyRenderMessage.mjs +2 -2
  38. package/dist/components/chat/messages/RenderMessage.d.ts +1 -1
  39. package/dist/components/chat/messages/RenderMessage.js +2 -0
  40. package/dist/components/chat/messages/RenderMessage.js.map +1 -1
  41. package/dist/components/chat/messages/RenderMessage.mjs +1 -1
  42. package/dist/components/dev-console/console.mjs +3 -3
  43. package/dist/components/dev-console/index.mjs +5 -5
  44. package/dist/components/index.js +2 -0
  45. package/dist/components/index.js.map +1 -1
  46. package/dist/components/index.mjs +21 -21
  47. package/dist/hooks/index.js +1 -1
  48. package/dist/hooks/index.js.map +1 -1
  49. package/dist/hooks/index.mjs +1 -1
  50. package/dist/hooks/use-copilot-chat-suggestions.js +1 -1
  51. package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
  52. package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
  53. package/dist/index.js +3 -1
  54. package/dist/index.js.map +1 -1
  55. package/dist/index.mjs +22 -22
  56. package/package.json +6 -6
  57. package/src/components/chat/messages/RenderMessage.tsx +2 -0
  58. package/src/hooks/use-copilot-chat-suggestions.tsx +2 -2
  59. /package/dist/{chunk-6PL5IKAT.mjs.map → chunk-4APTIMH3.mjs.map} +0 -0
  60. /package/dist/{chunk-GASWCRI7.mjs.map → chunk-7OURDQZJ.mjs.map} +0 -0
  61. /package/dist/{chunk-GDSZGYCE.mjs.map → chunk-B4EBCYMS.mjs.map} +0 -0
  62. /package/dist/{chunk-IOZL5AMG.mjs.map → chunk-ETQOY3FA.mjs.map} +0 -0
  63. /package/dist/{chunk-FFJHOZX6.mjs.map → chunk-FKJWIQGB.mjs.map} +0 -0
  64. /package/dist/{chunk-YJ45UASA.mjs.map → chunk-HIW7RXCD.mjs.map} +0 -0
  65. /package/dist/{chunk-U2EHC4KT.mjs.map → chunk-I2YM5J5H.mjs.map} +0 -0
  66. /package/dist/{chunk-SF5OH7KP.mjs.map → chunk-LG6H5CG5.mjs.map} +0 -0
  67. /package/dist/{chunk-3W6J75HS.mjs.map → chunk-SABFRQEH.mjs.map} +0 -0
@@ -3,28 +3,16 @@ import "../chunk-SC6JRFAJ.mjs";
3
3
  import "../chunk-WB3YULQ4.mjs";
4
4
  import {
5
5
  CopilotPopup
6
- } from "../chunk-U2EHC4KT.mjs";
6
+ } from "../chunk-I2YM5J5H.mjs";
7
7
  import {
8
8
  CopilotSidebar
9
- } from "../chunk-6PL5IKAT.mjs";
10
- import "../chunk-IOZL5AMG.mjs";
9
+ } from "../chunk-4APTIMH3.mjs";
10
+ import "../chunk-ETQOY3FA.mjs";
11
11
  import "../chunk-C3GSYRC3.mjs";
12
- import "../chunk-GDSZGYCE.mjs";
13
- import "../chunk-V7W6IM2V.mjs";
14
- import {
15
- CopilotDevConsole
16
- } from "../chunk-FFJHOZX6.mjs";
17
- import "../chunk-Q5V6S67N.mjs";
18
- import {
19
- shouldShowDevConsole
20
- } from "../chunk-JY2CSDKN.mjs";
21
- import "../chunk-KXE2JCUH.mjs";
22
- import "../chunk-NRA3CFEE.mjs";
23
- import "../chunk-BH6PCAAL.mjs";
24
12
  import "../chunk-UFN2VWSR.mjs";
25
13
  import {
26
14
  CopilotChat
27
- } from "../chunk-SF5OH7KP.mjs";
15
+ } from "../chunk-LG6H5CG5.mjs";
28
16
  import {
29
17
  Suggestions
30
18
  } from "../chunk-QB3GUN2N.mjs";
@@ -32,12 +20,11 @@ import {
32
20
  Suggestion
33
21
  } from "../chunk-NGJ32FAP.mjs";
34
22
  import "../chunk-PLHTVHUW.mjs";
35
- import "../chunk-3W6J75HS.mjs";
36
- import "../chunk-ELGRNEAO.mjs";
23
+ import "../chunk-SABFRQEH.mjs";
37
24
  import "../chunk-QIOJXTIQ.mjs";
38
- import "../chunk-YJ45UASA.mjs";
39
- import "../chunk-GASWCRI7.mjs";
40
- import "../chunk-VBYQQ5JS.mjs";
25
+ import "../chunk-HIW7RXCD.mjs";
26
+ import "../chunk-7OURDQZJ.mjs";
27
+ import "../chunk-NCIAFFQ2.mjs";
41
28
  import {
42
29
  AssistantMessage
43
30
  } from "../chunk-IHFR6PYG.mjs";
@@ -50,11 +37,24 @@ import {
50
37
  import {
51
38
  Markdown
52
39
  } from "../chunk-JZ3RFQQ6.mjs";
40
+ import "../chunk-ELGRNEAO.mjs";
53
41
  import "../chunk-IK2BPURM.mjs";
42
+ import "../chunk-B4EBCYMS.mjs";
54
43
  import {
55
44
  useChatContext
56
45
  } from "../chunk-IEMQ2SQW.mjs";
46
+ import "../chunk-V7W6IM2V.mjs";
47
+ import {
48
+ CopilotDevConsole
49
+ } from "../chunk-FKJWIQGB.mjs";
50
+ import "../chunk-KXE2JCUH.mjs";
51
+ import "../chunk-NRA3CFEE.mjs";
52
+ import "../chunk-BH6PCAAL.mjs";
53
+ import {
54
+ shouldShowDevConsole
55
+ } from "../chunk-JY2CSDKN.mjs";
57
56
  import "../chunk-XWG3L6QC.mjs";
57
+ import "../chunk-Q5V6S67N.mjs";
58
58
  import "../chunk-54JAUBUJ.mjs";
59
59
  import "../chunk-JGMFJZMG.mjs";
60
60
  import "../chunk-O72ZB5V3.mjs";
@@ -27,7 +27,7 @@ module.exports = __toCommonJS(hooks_exports);
27
27
  // src/hooks/use-copilot-chat-suggestions.tsx
28
28
  var import_react_core = require("@copilotkit/react-core");
29
29
  function useCopilotChatSuggestions(config, dependencies = []) {
30
- (0, import_react_core.useConfigureChatSuggestions)(config, dependencies);
30
+ (0, import_react_core.useCopilotChatSuggestions)(config, dependencies);
31
31
  }
32
32
  // Annotate the CommonJS export names for ESM import in node:
33
33
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/index.ts","../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["export * from \"./use-copilot-chat-suggestions\";\n","/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n useConfigureChatSuggestions,\n type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n config: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n useConfigureChatSuggestions(config, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4DA,wBAGO;AAEA,SAAS,0BACd,QACA,eAAsB,CAAC,GACvB;AACA,qDAA4B,QAAQ,YAAY;AAClD;","names":[]}
1
+ {"version":3,"sources":["../../src/hooks/index.ts","../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["export * from \"./use-copilot-chat-suggestions\";\n","/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n useCopilotChatSuggestions as useCoreCopilotChatSuggestions,\n type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n config: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n useCoreCopilotChatSuggestions(config, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4DA,wBAGO;AAEA,SAAS,0BACd,QACA,eAAsB,CAAC,GACvB;AACA,wBAAAA,2BAA8B,QAAQ,YAAY;AACpD;","names":["useCoreCopilotChatSuggestions"]}
@@ -1,7 +1,7 @@
1
1
  import "../chunk-T26KLXLH.mjs";
2
2
  import {
3
3
  useCopilotChatSuggestions
4
- } from "../chunk-OYRZ4VLU.mjs";
4
+ } from "../chunk-Y4FKRAKJ.mjs";
5
5
  import "../chunk-MRXNTQOX.mjs";
6
6
  export {
7
7
  useCopilotChatSuggestions
@@ -25,7 +25,7 @@ __export(use_copilot_chat_suggestions_exports, {
25
25
  module.exports = __toCommonJS(use_copilot_chat_suggestions_exports);
26
26
  var import_react_core = require("@copilotkit/react-core");
27
27
  function useCopilotChatSuggestions(config, dependencies = []) {
28
- (0, import_react_core.useConfigureChatSuggestions)(config, dependencies);
28
+ (0, import_react_core.useCopilotChatSuggestions)(config, dependencies);
29
29
  }
30
30
  // Annotate the CommonJS export names for ESM import in node:
31
31
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n useConfigureChatSuggestions,\n type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n config: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n useConfigureChatSuggestions(config, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4DA,wBAGO;AAEA,SAAS,0BACd,QACA,eAAsB,CAAC,GACvB;AACA,qDAA4B,QAAQ,YAAY;AAClD;","names":[]}
1
+ {"version":3,"sources":["../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n useCopilotChatSuggestions as useCoreCopilotChatSuggestions,\n type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n config: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n useCoreCopilotChatSuggestions(config, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4DA,wBAGO;AAEA,SAAS,0BACd,QACA,eAAsB,CAAC,GACvB;AACA,wBAAAA,2BAA8B,QAAQ,YAAY;AACpD;","names":["useCoreCopilotChatSuggestions"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChatSuggestions
3
- } from "../chunk-OYRZ4VLU.mjs";
3
+ } from "../chunk-Y4FKRAKJ.mjs";
4
4
  import "../chunk-MRXNTQOX.mjs";
5
5
  export {
6
6
  useCopilotChatSuggestions
package/dist/index.js CHANGED
@@ -1790,6 +1790,8 @@ function RenderMessage(_a) {
1790
1790
  },
1791
1791
  index
1792
1792
  );
1793
+ default:
1794
+ return null;
1793
1795
  }
1794
1796
  }
1795
1797
 
@@ -3108,7 +3110,7 @@ function CopilotSidebar(props) {
3108
3110
  // src/hooks/use-copilot-chat-suggestions.tsx
3109
3111
  var import_react_core11 = require("@copilotkit/react-core");
3110
3112
  function useCopilotChatSuggestions(config, dependencies = []) {
3111
- (0, import_react_core11.useConfigureChatSuggestions)(config, dependencies);
3113
+ (0, import_react_core11.useCopilotChatSuggestions)(config, dependencies);
3112
3114
  }
3113
3115
  // Annotate the CommonJS export names for ESM import in node:
3114
3116
  0 && (module.exports = {