@copilotkit/react-ui 0.36.0-mme-push-to-talk.0 → 0.36.0-mme-pre.1

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 (159) hide show
  1. package/.turbo/turbo-build.log +174 -167
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-DMAQBCTX.mjs → chunk-4MKP23AD.mjs} +6 -4
  4. package/dist/chunk-4MKP23AD.mjs.map +1 -0
  5. package/dist/{chunk-UVMROYDT.mjs → chunk-6XLZXLM5.mjs} +5 -5
  6. package/dist/{chunk-UVMROYDT.mjs.map → chunk-6XLZXLM5.mjs.map} +1 -1
  7. package/dist/{chunk-XYM43AHP.mjs → chunk-7FES2IQA.mjs} +3 -3
  8. package/dist/chunk-ANO23V2M.mjs +135 -0
  9. package/dist/chunk-ANO23V2M.mjs.map +1 -0
  10. package/dist/{chunk-DRNCOXZO.mjs → chunk-BL65ZC6L.mjs} +28 -7
  11. package/dist/chunk-BL65ZC6L.mjs.map +1 -0
  12. package/dist/{chunk-PGZDQT74.mjs → chunk-CE7PJAAO.mjs} +2 -2
  13. package/dist/{chunk-FWTPMPSN.mjs → chunk-FZC7X5PK.mjs} +23 -3
  14. package/dist/{chunk-FWTPMPSN.mjs.map → chunk-FZC7X5PK.mjs.map} +1 -1
  15. package/dist/{chunk-Z45ZEXJW.mjs → chunk-LTCJCXCP.mjs} +5 -8
  16. package/dist/chunk-LTCJCXCP.mjs.map +1 -0
  17. package/dist/chunk-MRFF7GSQ.mjs +1 -0
  18. package/dist/{chunk-SKC7AJIV.mjs → chunk-MRXNTQOX.mjs} +1 -3
  19. package/dist/{chunk-MWFHYCQB.mjs → chunk-PAQWLSA4.mjs} +2 -2
  20. package/dist/chunk-RT2XG2T7.mjs +25 -0
  21. package/dist/chunk-RT2XG2T7.mjs.map +1 -0
  22. package/dist/chunk-T3JTSIHT.mjs +93 -0
  23. package/dist/chunk-T3JTSIHT.mjs.map +1 -0
  24. package/dist/{chunk-A7J4KGLP.mjs → chunk-UPTB2MVO.mjs} +2 -2
  25. package/dist/{chunk-KZME7C5S.mjs → chunk-VUZA5AFH.mjs} +8 -11
  26. package/dist/chunk-VUZA5AFH.mjs.map +1 -0
  27. package/dist/{chunk-XWWMYJJF.mjs → chunk-XRODMID5.mjs} +5 -5
  28. package/dist/{chunk-XWWMYJJF.mjs.map → chunk-XRODMID5.mjs.map} +1 -1
  29. package/dist/{chunk-ZKLK3M77.mjs → chunk-YQ3D5IQV.mjs} +3 -3
  30. package/dist/{chunk-WM6BS77F.mjs → chunk-YQFVRDNC.mjs} +2 -2
  31. package/dist/{chunk-WM6BS77F.mjs.map → chunk-YQFVRDNC.mjs.map} +1 -1
  32. package/dist/chunk-ZO3GLN23.mjs +137 -0
  33. package/dist/chunk-ZO3GLN23.mjs.map +1 -0
  34. package/dist/components/chat/Button.d.ts +1 -1
  35. package/dist/components/chat/Button.js +2 -30
  36. package/dist/components/chat/Button.js.map +1 -1
  37. package/dist/components/chat/Button.mjs +4 -4
  38. package/dist/components/chat/Chat.d.ts +66 -47
  39. package/dist/components/chat/Chat.js +274 -430
  40. package/dist/components/chat/Chat.js.map +1 -1
  41. package/dist/components/chat/Chat.mjs +16 -17
  42. package/dist/components/chat/ChatContext.d.ts +17 -22
  43. package/dist/components/chat/ChatContext.js +23 -8
  44. package/dist/components/chat/ChatContext.js.map +1 -1
  45. package/dist/components/chat/ChatContext.mjs +3 -3
  46. package/dist/components/chat/CodeBlock.js.map +1 -1
  47. package/dist/components/chat/CodeBlock.mjs +3 -3
  48. package/dist/components/chat/Header.js.map +1 -1
  49. package/dist/components/chat/Header.mjs +4 -4
  50. package/dist/components/chat/Icons.d.ts +6 -5
  51. package/dist/components/chat/Icons.js +21 -0
  52. package/dist/components/chat/Icons.js.map +1 -1
  53. package/dist/components/chat/Icons.mjs +4 -2
  54. package/dist/components/chat/Input.js +147 -9
  55. package/dist/components/chat/Input.js.map +1 -1
  56. package/dist/components/chat/Input.mjs +6 -5
  57. package/dist/components/chat/Markdown.js.map +1 -1
  58. package/dist/components/chat/Markdown.mjs +4 -4
  59. package/dist/components/chat/Messages.js.map +1 -1
  60. package/dist/components/chat/Messages.mjs +6 -6
  61. package/dist/components/chat/Modal.d.ts +50 -0
  62. package/dist/components/chat/Modal.js +1584 -0
  63. package/dist/components/chat/Modal.js.map +1 -0
  64. package/dist/components/chat/Modal.mjs +23 -0
  65. package/dist/components/chat/Popup.d.ts +6 -5
  66. package/dist/components/chat/Popup.js +288 -249
  67. package/dist/components/chat/Popup.js.map +1 -1
  68. package/dist/components/chat/Popup.mjs +16 -15
  69. package/dist/components/chat/Response.js.map +1 -1
  70. package/dist/components/chat/Response.mjs +4 -4
  71. package/dist/components/chat/Sidebar.d.ts +6 -5
  72. package/dist/components/chat/Sidebar.js +290 -251
  73. package/dist/components/chat/Sidebar.js.map +1 -1
  74. package/dist/components/chat/Sidebar.mjs +16 -15
  75. package/dist/components/chat/Suggestion.d.ts +1 -2
  76. package/dist/components/chat/Suggestion.js.map +1 -1
  77. package/dist/components/chat/Suggestion.mjs +3 -3
  78. package/dist/components/chat/Textarea.d.ts +4 -4
  79. package/dist/components/chat/Textarea.js +1 -1
  80. package/dist/components/chat/Textarea.js.map +1 -1
  81. package/dist/components/chat/Textarea.mjs +2 -2
  82. package/dist/components/chat/Window.mjs +1 -1
  83. package/dist/components/chat/index.d.ts +2 -1
  84. package/dist/components/chat/index.js +294 -253
  85. package/dist/components/chat/index.js.map +1 -1
  86. package/dist/components/chat/index.mjs +23 -19
  87. package/dist/components/chat/props.d.ts +1 -3
  88. package/dist/components/chat/props.js.map +1 -1
  89. package/dist/components/index.d.ts +2 -1
  90. package/dist/components/index.js +294 -253
  91. package/dist/components/index.js.map +1 -1
  92. package/dist/components/index.mjs +23 -19
  93. package/dist/hooks/index.d.ts +0 -1
  94. package/dist/hooks/index.js +6 -31
  95. package/dist/hooks/index.js.map +1 -1
  96. package/dist/hooks/index.mjs +2 -22
  97. package/dist/hooks/use-copilot-chat-suggestions.d.ts +26 -4
  98. package/dist/hooks/use-copilot-chat-suggestions.js +6 -31
  99. package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
  100. package/dist/hooks/use-copilot-chat-suggestions.mjs +2 -22
  101. package/dist/hooks/use-copy-to-clipboard.mjs +1 -1
  102. package/dist/hooks/use-push-to-talk.d.ts +19 -0
  103. package/dist/hooks/use-push-to-talk.js +177 -0
  104. package/dist/hooks/use-push-to-talk.js.map +1 -0
  105. package/dist/hooks/use-push-to-talk.mjs +12 -0
  106. package/dist/hooks/use-push-to-talk.mjs.map +1 -0
  107. package/dist/index.css +60 -8
  108. package/dist/index.css.map +1 -1
  109. package/dist/index.d.ts +2 -1
  110. package/dist/index.js +300 -258
  111. package/dist/index.js.map +1 -1
  112. package/dist/index.mjs +28 -24
  113. package/dist/lib/utils.mjs +1 -1
  114. package/dist/types/suggestions.d.ts +1 -21
  115. package/dist/types/suggestions.js.map +1 -1
  116. package/package.json +6 -6
  117. package/src/components/chat/Button.tsx +2 -35
  118. package/src/components/chat/Chat.tsx +126 -255
  119. package/src/components/chat/ChatContext.tsx +8 -22
  120. package/src/components/chat/Icons.tsx +17 -0
  121. package/src/components/chat/Input.tsx +37 -5
  122. package/src/components/chat/Modal.tsx +115 -0
  123. package/src/components/chat/Popup.tsx +3 -3
  124. package/src/components/chat/Sidebar.tsx +4 -4
  125. package/src/components/chat/Suggestion.tsx +6 -2
  126. package/src/components/chat/Textarea.tsx +1 -1
  127. package/src/components/chat/index.tsx +1 -0
  128. package/src/components/chat/props.ts +1 -3
  129. package/src/css/input.css +18 -8
  130. package/src/css/panel.css +38 -0
  131. package/src/css/window.css +3 -1
  132. package/src/hooks/use-copilot-chat-suggestions.tsx +31 -5
  133. package/src/hooks/use-push-to-talk.tsx +162 -0
  134. package/src/styles.css +1 -0
  135. package/src/types/suggestions.ts +0 -24
  136. package/dist/chunk-5ASYNEHX.mjs +0 -53
  137. package/dist/chunk-5ASYNEHX.mjs.map +0 -1
  138. package/dist/chunk-DMAQBCTX.mjs.map +0 -1
  139. package/dist/chunk-DRNCOXZO.mjs.map +0 -1
  140. package/dist/chunk-JPX5ODUX.mjs +0 -266
  141. package/dist/chunk-JPX5ODUX.mjs.map +0 -1
  142. package/dist/chunk-KZME7C5S.mjs.map +0 -1
  143. package/dist/chunk-PEDSZYHE.mjs +0 -36
  144. package/dist/chunk-PEDSZYHE.mjs.map +0 -1
  145. package/dist/chunk-UGQQ4WEQ.mjs +0 -1
  146. package/dist/chunk-Z45ZEXJW.mjs.map +0 -1
  147. package/dist/components/chat/audio.d.ts +0 -7
  148. package/dist/components/chat/audio.js +0 -77
  149. package/dist/components/chat/audio.js.map +0 -1
  150. package/dist/components/chat/audio.mjs +0 -10
  151. package/src/components/chat/audio.ts +0 -26
  152. /package/dist/{chunk-XYM43AHP.mjs.map → chunk-7FES2IQA.mjs.map} +0 -0
  153. /package/dist/{chunk-PGZDQT74.mjs.map → chunk-CE7PJAAO.mjs.map} +0 -0
  154. /package/dist/{chunk-SKC7AJIV.mjs.map → chunk-MRFF7GSQ.mjs.map} +0 -0
  155. /package/dist/{chunk-UGQQ4WEQ.mjs.map → chunk-MRXNTQOX.mjs.map} +0 -0
  156. /package/dist/{chunk-MWFHYCQB.mjs.map → chunk-PAQWLSA4.mjs.map} +0 -0
  157. /package/dist/{chunk-A7J4KGLP.mjs.map → chunk-UPTB2MVO.mjs.map} +0 -0
  158. /package/dist/{chunk-ZKLK3M77.mjs.map → chunk-YQ3D5IQV.mjs.map} +0 -0
  159. /package/dist/components/chat/{audio.mjs.map → Modal.mjs.map} +0 -0
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/hooks/index.ts
@@ -35,41 +25,26 @@ __export(hooks_exports, {
35
25
  module.exports = __toCommonJS(hooks_exports);
36
26
 
37
27
  // src/hooks/use-copilot-chat-suggestions.tsx
38
- var import_react2 = require("react");
39
-
40
- // src/components/chat/ChatContext.tsx
41
- var import_react = __toESM(require("react"));
42
- var import_jsx_runtime = require("react/jsx-runtime");
43
- var ChatContext = import_react.default.createContext(void 0);
44
- function useChatContext() {
45
- const context = import_react.default.useContext(ChatContext);
46
- if (context === void 0) {
47
- throw new Error(
48
- "Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?"
49
- );
50
- }
51
- return context;
52
- }
53
-
54
- // src/hooks/use-copilot-chat-suggestions.tsx
28
+ var import_react = require("react");
55
29
  var import_nanoid = require("nanoid");
30
+ var import_react_core = require("@copilotkit/react-core");
56
31
  function useCopilotChatSuggestions({
57
32
  instructions,
58
33
  className,
59
34
  minSuggestions = 1,
60
35
  maxSuggestions = 3
61
36
  }, dependencies = []) {
62
- const chatContext = useChatContext();
63
- (0, import_react2.useEffect)(() => {
37
+ const context = (0, import_react_core.useCopilotContext)();
38
+ (0, import_react.useEffect)(() => {
64
39
  const id = (0, import_nanoid.nanoid)();
65
- chatContext.addChatSuggestionConfiguration(id, {
40
+ context.addChatSuggestionConfiguration(id, {
66
41
  instructions,
67
42
  minSuggestions,
68
43
  maxSuggestions,
69
44
  className
70
45
  });
71
46
  return () => {
72
- chatContext.removeChatSuggestionConfiguration(id);
47
+ context.removeChatSuggestionConfiguration(id);
73
48
  };
74
49
  }, dependencies);
75
50
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/index.ts","../../src/hooks/use-copilot-chat-suggestions.tsx","../../src/components/chat/ChatContext.tsx"],"sourcesContent":["export * from \"./use-copilot-chat-suggestions\";\n","/**\n * A hook for providing suggestions to the user in the Copilot chat.\n *\n * <img src=\"/images/useCopilotChatSuggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=a9b290bb-38f9-4518-ac3b-8f54fdbf43be\" />\n *\n * `useCopilotChatSuggestions` integrates auto-generated chat suggestions into your application in the context of your\n * app's state. It dynamically manages suggestions based on provided configurations and\n * dependencies.\n *\n * <RequestExample>\n * ```jsx useCopilotChatSuggestions Example\n * import { useCopilotChatSuggestions }\n * from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * })\n * ```\n * </RequestExample>\n *\n * ## Basic Setup\n *\n * To incorporate this hook into your React components, start by importing it:\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n * ```\n *\n * Then, use it in your component to initiate suggestion functionality:\n *\n * ```tsx\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * });\n * ```\n *\n * ## Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\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 */\n\nimport { useEffect } from \"react\";\nimport { useChatContext } from \"../components\";\nimport { nanoid } from \"nanoid\";\nimport { CopilotChatSuggestionConfiguration } from \"../types/suggestions\";\n\nexport function useCopilotChatSuggestions(\n {\n instructions,\n className,\n minSuggestions = 1,\n maxSuggestions = 3,\n }: CopilotChatSuggestionConfiguration,\n dependencies: any[] = [],\n) {\n const chatContext = useChatContext();\n\n useEffect(() => {\n const id = nanoid();\n\n chatContext.addChatSuggestionConfiguration(id, {\n instructions,\n minSuggestions,\n maxSuggestions,\n className,\n });\n\n return () => {\n chatContext.removeChatSuggestionConfiguration(id);\n };\n }, dependencies);\n}\n","import React, { useMemo, useState } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\nimport { CopilotChatSuggestion, CopilotChatSuggestionConfiguration } from \"../../types/suggestions\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n /**\n * The icon to use for the open chat button.\n * @default <OpenIcon />\n */\n openIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button.\n * @default <CloseIcon />\n */\n closeIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button in the header.\n * @default <HeaderCloseIcon />\n */\n headerCloseIcon?: React.ReactNode;\n\n /**\n * The icon to use for the send button.\n * @default <SendIcon />\n */\n sendIcon?: React.ReactNode;\n\n /**\n * The icon to use for the activity indicator.\n * @default <ActivityIcon />\n */\n activityIcon?: React.ReactNode;\n\n /**\n * The icon to use for the spinner.\n * @default <SpinnerIcon />\n */\n spinnerIcon?: React.ReactNode;\n\n /**\n * The icon to use for the stop button.\n * @default <StopIcon />\n */\n stopIcon?: React.ReactNode;\n\n /**\n * The icon to use for the regenerate button.\n * @default <RegenerateIcon />\n */\n regenerateIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n /**\n * The initial message(s) to display in the chat window.\n */\n initial?: string | string[];\n\n /**\n * The title to display in the header.\n * @default \"CopilotKit\"\n */\n title?: string;\n\n /**\n * The placeholder to display in the input.\n * @default \"Type a message...\"\n */\n placeholder?: string;\n\n /**\n * The message to display while the chat GPT is \"thinking\".\n * @default \"Thinking...\"\n */\n thinking?: string;\n\n /**\n * The message to display when an error occurs.\n * @default \"❌ An error occurred. Please try again.\"\n */\n error?: string;\n\n /**\n * The label to display on the stop button.\n * @default \"Stop generating\"\n */\n stopGenerating?: string;\n\n /**\n * The label to display on the regenerate button.\n * @default \"Regenerate response\"\n */\n regenerateResponse?: string;\n}\n\ninterface ChatContext {\n labels: Required<CopilotChatLabels>;\n icons: Required<CopilotChatIcons>;\n open: boolean;\n setOpen: (open: boolean) => void;\n addChatSuggestionConfiguration: (\n id: string,\n suggestion: CopilotChatSuggestionConfiguration,\n ) => void;\n removeChatSuggestionConfiguration: (id: string) => void;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(undefined);\n\nexport function useChatContext(): ChatContext {\n const context = React.useContext(ChatContext);\n if (context === undefined) {\n throw new Error(\n \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n );\n }\n return context;\n}\n\ninterface ChatContextProps {\n // temperature?: number;\n // instructions?: string;\n // maxFeedback?: number;\n labels?: CopilotChatLabels;\n icons?: CopilotChatIcons;\n children?: React.ReactNode;\n open: boolean;\n setOpen: (open: boolean) => void;\n addChatSuggestionConfiguration: (\n id: string,\n suggestion: CopilotChatSuggestionConfiguration,\n ) => void;\n removeChatSuggestionConfiguration: (id: string) => void;\n}\n\nexport const ChatContextProvider = ({\n // temperature,\n // instructions,\n // maxFeedback,\n labels,\n icons,\n children,\n open,\n setOpen,\n addChatSuggestionConfiguration,\n removeChatSuggestionConfiguration,\n}: ChatContextProps) => {\n const context = {\n labels: {\n ...{\n initial: \"\",\n title: \"CopilotKit\",\n placeholder: \"Type a message...\",\n thinking: \"Thinking...\",\n error: \"❌ An error occurred. Please try again.\",\n stopGenerating: \"Stop generating\",\n regenerateResponse: \"Regenerate response\",\n },\n ...labels,\n },\n\n icons: {\n ...{\n openIcon: DefaultIcons.OpenIcon,\n closeIcon: DefaultIcons.CloseIcon,\n headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n sendIcon: DefaultIcons.SendIcon,\n activityIcon: DefaultIcons.ActivityIcon,\n spinnerIcon: DefaultIcons.SpinnerIcon,\n stopIcon: DefaultIcons.StopIcon,\n regenerateIcon: DefaultIcons.RegenerateIcon,\n },\n icons,\n },\n open,\n setOpen,\n addChatSuggestionConfiguration,\n removeChatSuggestionConfiguration,\n };\n return <ChatContext.Provider value={context}>{children}</ChatContext.Provider>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4DA,IAAAA,gBAA0B;;;AC5D1B,mBAAyC;AA2LhC;AAxEF,IAAM,cAAc,aAAAC,QAAM,cAAuC,MAAS;AAE1E,SAAS,iBAA8B;AAC5C,QAAM,UAAU,aAAAA,QAAM,WAAW,WAAW;AAC5C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AD/DA,oBAAuB;AAGhB,SAAS,0BACd;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GACA,eAAsB,CAAC,GACvB;AACA,QAAM,cAAc,eAAe;AAEnC,+BAAU,MAAM;AACd,UAAM,SAAK,sBAAO;AAElB,gBAAY,+BAA+B,IAAI;AAAA,MAC7C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,kBAAY,kCAAkC,EAAE;AAAA,IAClD;AAAA,EACF,GAAG,YAAY;AACjB;","names":["import_react","React"]}
1
+ {"version":3,"sources":["../../src/hooks/index.ts","../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["export * from \"./use-copilot-chat-suggestions\";\n","/**\n * A hook for providing suggestions to the user in the Copilot chat.\n *\n * <Warning>\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without further notice.\n * </Warning>\n *\n * <img src=\"/images/useCopilotChatSuggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=a9b290bb-38f9-4518-ac3b-8f54fdbf43be\" />\n *\n * `useCopilotChatSuggestions` integrates auto-generated chat suggestions into your application in the context of your\n * app's state. It dynamically manages suggestions based on provided configurations and\n * dependencies.\n *\n * <RequestExample>\n * ```jsx useCopilotChatSuggestions Example\n * import { useCopilotChatSuggestions }\n * from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * })\n * ```\n * </RequestExample>\n *\n * ## Basic Setup\n *\n * To incorporate this hook into your React components, start by importing it:\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n * ```\n *\n * Then, use it in your component to initiate suggestion functionality:\n *\n * ```tsx\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * });\n * ```\n *\n * ## Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\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 */\n\nimport { useEffect } from \"react\";\nimport { useChatContext } from \"../components\";\nimport { nanoid } from \"nanoid\";\nimport { CopilotChatSuggestionConfiguration, useCopilotContext } from \"@copilotkit/react-core\";\n\ninterface UseCopilotChatSuggestionsConfiguration {\n /**\n * A prompt or instructions for the GPT to generate suggestions.\n */\n instructions: string;\n /**\n * The minimum number of suggestions to generate. Defaults to `1`.\n * @default 1\n */\n minSuggestions?: number;\n /**\n * The maximum number of suggestions to generate. Defaults to `3`.\n * @default 1\n */\n maxSuggestions?: number;\n /**\n * An optional class name to apply to the suggestions.\n */\n className?: string;\n}\n\nexport function useCopilotChatSuggestions(\n {\n instructions,\n className,\n minSuggestions = 1,\n maxSuggestions = 3,\n }: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n const context = useCopilotContext();\n\n useEffect(() => {\n const id = nanoid();\n\n context.addChatSuggestionConfiguration(id, {\n instructions,\n minSuggestions,\n maxSuggestions,\n className,\n });\n\n return () => {\n context.removeChatSuggestionConfiguration(id);\n };\n }, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiEA,mBAA0B;AAE1B,oBAAuB;AACvB,wBAAsE;AAuB/D,SAAS,0BACd;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GACA,eAAsB,CAAC,GACvB;AACA,QAAM,cAAU,qCAAkB;AAElC,8BAAU,MAAM;AACd,UAAM,SAAK,sBAAO;AAElB,YAAQ,+BAA+B,IAAI;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,cAAQ,kCAAkC,EAAE;AAAA,IAC9C;AAAA,EACF,GAAG,YAAY;AACjB;","names":[]}
@@ -1,28 +1,8 @@
1
1
  import "../chunk-T26KLXLH.mjs";
2
2
  import {
3
3
  useCopilotChatSuggestions
4
- } from "../chunk-Z45ZEXJW.mjs";
5
- import "../chunk-JD7BAH7U.mjs";
6
- import "../chunk-UGQQ4WEQ.mjs";
7
- import "../chunk-WB3YULQ4.mjs";
8
- import "../chunk-XWWMYJJF.mjs";
9
- import "../chunk-UVMROYDT.mjs";
10
- import "../chunk-JPX5ODUX.mjs";
11
- import "../chunk-B7DNOYVQ.mjs";
12
- import "../chunk-PEDSZYHE.mjs";
13
- import "../chunk-DRNCOXZO.mjs";
14
- import "../chunk-WM6BS77F.mjs";
15
- import "../chunk-XYM43AHP.mjs";
16
- import "../chunk-ZKLK3M77.mjs";
17
- import "../chunk-PGZDQT74.mjs";
18
- import "../chunk-DMAQBCTX.mjs";
19
- import "../chunk-5ASYNEHX.mjs";
20
- import "../chunk-A7J4KGLP.mjs";
21
- import "../chunk-MWFHYCQB.mjs";
22
- import "../chunk-KZME7C5S.mjs";
23
- import "../chunk-FWTPMPSN.mjs";
24
- import "../chunk-54JAUBUJ.mjs";
25
- import "../chunk-SKC7AJIV.mjs";
4
+ } from "../chunk-LTCJCXCP.mjs";
5
+ import "../chunk-MRXNTQOX.mjs";
26
6
  export {
27
7
  useCopilotChatSuggestions
28
8
  };
@@ -1,8 +1,11 @@
1
- import { CopilotChatSuggestionConfiguration } from '../types/suggestions.js';
2
-
3
1
  /**
4
2
  * A hook for providing suggestions to the user in the Copilot chat.
5
3
  *
4
+ * <Warning>
5
+ * useCopilotChatSuggestions is experimental. The interface is not final and
6
+ * can change without further notice.
7
+ * </Warning>
8
+ *
6
9
  * <img src="/images/useCopilotChatSuggestions/use-copilot-chat-suggestions.gif" width="500" />
7
10
  *
8
11
  * <img referrerPolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=a9b290bb-38f9-4518-ac3b-8f54fdbf43be" />
@@ -59,7 +62,26 @@ import { CopilotChatSuggestionConfiguration } from '../types/suggestions.js';
59
62
  * The hook registers the configuration with the chat context upon component mount and
60
63
  * removes it on unmount, ensuring a clean and efficient lifecycle management.
61
64
  */
62
-
63
- declare function useCopilotChatSuggestions({ instructions, className, minSuggestions, maxSuggestions, }: CopilotChatSuggestionConfiguration, dependencies?: any[]): void;
65
+ interface UseCopilotChatSuggestionsConfiguration {
66
+ /**
67
+ * A prompt or instructions for the GPT to generate suggestions.
68
+ */
69
+ instructions: string;
70
+ /**
71
+ * The minimum number of suggestions to generate. Defaults to `1`.
72
+ * @default 1
73
+ */
74
+ minSuggestions?: number;
75
+ /**
76
+ * The maximum number of suggestions to generate. Defaults to `3`.
77
+ * @default 1
78
+ */
79
+ maxSuggestions?: number;
80
+ /**
81
+ * An optional class name to apply to the suggestions.
82
+ */
83
+ className?: string;
84
+ }
85
+ declare function useCopilotChatSuggestions({ instructions, className, minSuggestions, maxSuggestions, }: UseCopilotChatSuggestionsConfiguration, dependencies?: any[]): void;
64
86
 
65
87
  export { useCopilotChatSuggestions };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/hooks/use-copilot-chat-suggestions.tsx
@@ -33,41 +23,26 @@ __export(use_copilot_chat_suggestions_exports, {
33
23
  useCopilotChatSuggestions: () => useCopilotChatSuggestions
34
24
  });
35
25
  module.exports = __toCommonJS(use_copilot_chat_suggestions_exports);
36
- var import_react2 = require("react");
37
-
38
- // src/components/chat/ChatContext.tsx
39
- var import_react = __toESM(require("react"));
40
- var import_jsx_runtime = require("react/jsx-runtime");
41
- var ChatContext = import_react.default.createContext(void 0);
42
- function useChatContext() {
43
- const context = import_react.default.useContext(ChatContext);
44
- if (context === void 0) {
45
- throw new Error(
46
- "Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?"
47
- );
48
- }
49
- return context;
50
- }
51
-
52
- // src/hooks/use-copilot-chat-suggestions.tsx
26
+ var import_react = require("react");
53
27
  var import_nanoid = require("nanoid");
28
+ var import_react_core = require("@copilotkit/react-core");
54
29
  function useCopilotChatSuggestions({
55
30
  instructions,
56
31
  className,
57
32
  minSuggestions = 1,
58
33
  maxSuggestions = 3
59
34
  }, dependencies = []) {
60
- const chatContext = useChatContext();
61
- (0, import_react2.useEffect)(() => {
35
+ const context = (0, import_react_core.useCopilotContext)();
36
+ (0, import_react.useEffect)(() => {
62
37
  const id = (0, import_nanoid.nanoid)();
63
- chatContext.addChatSuggestionConfiguration(id, {
38
+ context.addChatSuggestionConfiguration(id, {
64
39
  instructions,
65
40
  minSuggestions,
66
41
  maxSuggestions,
67
42
  className
68
43
  });
69
44
  return () => {
70
- chatContext.removeChatSuggestionConfiguration(id);
45
+ context.removeChatSuggestionConfiguration(id);
71
46
  };
72
47
  }, dependencies);
73
48
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/use-copilot-chat-suggestions.tsx","../../src/components/chat/ChatContext.tsx"],"sourcesContent":["/**\n * A hook for providing suggestions to the user in the Copilot chat.\n *\n * <img src=\"/images/useCopilotChatSuggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=a9b290bb-38f9-4518-ac3b-8f54fdbf43be\" />\n *\n * `useCopilotChatSuggestions` integrates auto-generated chat suggestions into your application in the context of your\n * app's state. It dynamically manages suggestions based on provided configurations and\n * dependencies.\n *\n * <RequestExample>\n * ```jsx useCopilotChatSuggestions Example\n * import { useCopilotChatSuggestions }\n * from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * })\n * ```\n * </RequestExample>\n *\n * ## Basic Setup\n *\n * To incorporate this hook into your React components, start by importing it:\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n * ```\n *\n * Then, use it in your component to initiate suggestion functionality:\n *\n * ```tsx\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * });\n * ```\n *\n * ## Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\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 */\n\nimport { useEffect } from \"react\";\nimport { useChatContext } from \"../components\";\nimport { nanoid } from \"nanoid\";\nimport { CopilotChatSuggestionConfiguration } from \"../types/suggestions\";\n\nexport function useCopilotChatSuggestions(\n {\n instructions,\n className,\n minSuggestions = 1,\n maxSuggestions = 3,\n }: CopilotChatSuggestionConfiguration,\n dependencies: any[] = [],\n) {\n const chatContext = useChatContext();\n\n useEffect(() => {\n const id = nanoid();\n\n chatContext.addChatSuggestionConfiguration(id, {\n instructions,\n minSuggestions,\n maxSuggestions,\n className,\n });\n\n return () => {\n chatContext.removeChatSuggestionConfiguration(id);\n };\n }, dependencies);\n}\n","import React, { useMemo, useState } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\nimport { CopilotChatSuggestion, CopilotChatSuggestionConfiguration } from \"../../types/suggestions\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n /**\n * The icon to use for the open chat button.\n * @default <OpenIcon />\n */\n openIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button.\n * @default <CloseIcon />\n */\n closeIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button in the header.\n * @default <HeaderCloseIcon />\n */\n headerCloseIcon?: React.ReactNode;\n\n /**\n * The icon to use for the send button.\n * @default <SendIcon />\n */\n sendIcon?: React.ReactNode;\n\n /**\n * The icon to use for the activity indicator.\n * @default <ActivityIcon />\n */\n activityIcon?: React.ReactNode;\n\n /**\n * The icon to use for the spinner.\n * @default <SpinnerIcon />\n */\n spinnerIcon?: React.ReactNode;\n\n /**\n * The icon to use for the stop button.\n * @default <StopIcon />\n */\n stopIcon?: React.ReactNode;\n\n /**\n * The icon to use for the regenerate button.\n * @default <RegenerateIcon />\n */\n regenerateIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n /**\n * The initial message(s) to display in the chat window.\n */\n initial?: string | string[];\n\n /**\n * The title to display in the header.\n * @default \"CopilotKit\"\n */\n title?: string;\n\n /**\n * The placeholder to display in the input.\n * @default \"Type a message...\"\n */\n placeholder?: string;\n\n /**\n * The message to display while the chat GPT is \"thinking\".\n * @default \"Thinking...\"\n */\n thinking?: string;\n\n /**\n * The message to display when an error occurs.\n * @default \"❌ An error occurred. Please try again.\"\n */\n error?: string;\n\n /**\n * The label to display on the stop button.\n * @default \"Stop generating\"\n */\n stopGenerating?: string;\n\n /**\n * The label to display on the regenerate button.\n * @default \"Regenerate response\"\n */\n regenerateResponse?: string;\n}\n\ninterface ChatContext {\n labels: Required<CopilotChatLabels>;\n icons: Required<CopilotChatIcons>;\n open: boolean;\n setOpen: (open: boolean) => void;\n addChatSuggestionConfiguration: (\n id: string,\n suggestion: CopilotChatSuggestionConfiguration,\n ) => void;\n removeChatSuggestionConfiguration: (id: string) => void;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(undefined);\n\nexport function useChatContext(): ChatContext {\n const context = React.useContext(ChatContext);\n if (context === undefined) {\n throw new Error(\n \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n );\n }\n return context;\n}\n\ninterface ChatContextProps {\n // temperature?: number;\n // instructions?: string;\n // maxFeedback?: number;\n labels?: CopilotChatLabels;\n icons?: CopilotChatIcons;\n children?: React.ReactNode;\n open: boolean;\n setOpen: (open: boolean) => void;\n addChatSuggestionConfiguration: (\n id: string,\n suggestion: CopilotChatSuggestionConfiguration,\n ) => void;\n removeChatSuggestionConfiguration: (id: string) => void;\n}\n\nexport const ChatContextProvider = ({\n // temperature,\n // instructions,\n // maxFeedback,\n labels,\n icons,\n children,\n open,\n setOpen,\n addChatSuggestionConfiguration,\n removeChatSuggestionConfiguration,\n}: ChatContextProps) => {\n const context = {\n labels: {\n ...{\n initial: \"\",\n title: \"CopilotKit\",\n placeholder: \"Type a message...\",\n thinking: \"Thinking...\",\n error: \"❌ An error occurred. Please try again.\",\n stopGenerating: \"Stop generating\",\n regenerateResponse: \"Regenerate response\",\n },\n ...labels,\n },\n\n icons: {\n ...{\n openIcon: DefaultIcons.OpenIcon,\n closeIcon: DefaultIcons.CloseIcon,\n headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n sendIcon: DefaultIcons.SendIcon,\n activityIcon: DefaultIcons.ActivityIcon,\n spinnerIcon: DefaultIcons.SpinnerIcon,\n stopIcon: DefaultIcons.StopIcon,\n regenerateIcon: DefaultIcons.RegenerateIcon,\n },\n icons,\n },\n open,\n setOpen,\n addChatSuggestionConfiguration,\n removeChatSuggestionConfiguration,\n };\n return <ChatContext.Provider value={context}>{children}</ChatContext.Provider>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4DA,IAAAA,gBAA0B;;;AC5D1B,mBAAyC;AA2LhC;AAxEF,IAAM,cAAc,aAAAC,QAAM,cAAuC,MAAS;AAE1E,SAAS,iBAA8B;AAC5C,QAAM,UAAU,aAAAA,QAAM,WAAW,WAAW;AAC5C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AD/DA,oBAAuB;AAGhB,SAAS,0BACd;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GACA,eAAsB,CAAC,GACvB;AACA,QAAM,cAAc,eAAe;AAEnC,+BAAU,MAAM;AACd,UAAM,SAAK,sBAAO;AAElB,gBAAY,+BAA+B,IAAI;AAAA,MAC7C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,kBAAY,kCAAkC,EAAE;AAAA,IAClD;AAAA,EACF,GAAG,YAAY;AACjB;","names":["import_react","React"]}
1
+ {"version":3,"sources":["../../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["/**\n * A hook for providing suggestions to the user in the Copilot chat.\n *\n * <Warning>\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without further notice.\n * </Warning>\n *\n * <img src=\"/images/useCopilotChatSuggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * <img referrerPolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=a9b290bb-38f9-4518-ac3b-8f54fdbf43be\" />\n *\n * `useCopilotChatSuggestions` integrates auto-generated chat suggestions into your application in the context of your\n * app's state. It dynamically manages suggestions based on provided configurations and\n * dependencies.\n *\n * <RequestExample>\n * ```jsx useCopilotChatSuggestions Example\n * import { useCopilotChatSuggestions }\n * from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * })\n * ```\n * </RequestExample>\n *\n * ## Basic Setup\n *\n * To incorporate this hook into your React components, start by importing it:\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n * ```\n *\n * Then, use it in your component to initiate suggestion functionality:\n *\n * ```tsx\n * useCopilotChatSuggestions({\n * instructions: \"Your instructions for suggestions.\",\n * });\n * ```\n *\n * ## Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\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 */\n\nimport { useEffect } from \"react\";\nimport { useChatContext } from \"../components\";\nimport { nanoid } from \"nanoid\";\nimport { CopilotChatSuggestionConfiguration, useCopilotContext } from \"@copilotkit/react-core\";\n\ninterface UseCopilotChatSuggestionsConfiguration {\n /**\n * A prompt or instructions for the GPT to generate suggestions.\n */\n instructions: string;\n /**\n * The minimum number of suggestions to generate. Defaults to `1`.\n * @default 1\n */\n minSuggestions?: number;\n /**\n * The maximum number of suggestions to generate. Defaults to `3`.\n * @default 1\n */\n maxSuggestions?: number;\n /**\n * An optional class name to apply to the suggestions.\n */\n className?: string;\n}\n\nexport function useCopilotChatSuggestions(\n {\n instructions,\n className,\n minSuggestions = 1,\n maxSuggestions = 3,\n }: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n const context = useCopilotContext();\n\n useEffect(() => {\n const id = nanoid();\n\n context.addChatSuggestionConfiguration(id, {\n instructions,\n minSuggestions,\n maxSuggestions,\n className,\n });\n\n return () => {\n context.removeChatSuggestionConfiguration(id);\n };\n }, dependencies);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiEA,mBAA0B;AAE1B,oBAAuB;AACvB,wBAAsE;AAuB/D,SAAS,0BACd;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GACA,eAAsB,CAAC,GACvB;AACA,QAAM,cAAU,qCAAkB;AAElC,8BAAU,MAAM;AACd,UAAM,SAAK,sBAAO;AAElB,YAAQ,+BAA+B,IAAI;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,cAAQ,kCAAkC,EAAE;AAAA,IAC9C;AAAA,EACF,GAAG,YAAY;AACjB;","names":[]}
@@ -1,27 +1,7 @@
1
1
  import {
2
2
  useCopilotChatSuggestions
3
- } from "../chunk-Z45ZEXJW.mjs";
4
- import "../chunk-JD7BAH7U.mjs";
5
- import "../chunk-UGQQ4WEQ.mjs";
6
- import "../chunk-WB3YULQ4.mjs";
7
- import "../chunk-XWWMYJJF.mjs";
8
- import "../chunk-UVMROYDT.mjs";
9
- import "../chunk-JPX5ODUX.mjs";
10
- import "../chunk-B7DNOYVQ.mjs";
11
- import "../chunk-PEDSZYHE.mjs";
12
- import "../chunk-DRNCOXZO.mjs";
13
- import "../chunk-WM6BS77F.mjs";
14
- import "../chunk-XYM43AHP.mjs";
15
- import "../chunk-ZKLK3M77.mjs";
16
- import "../chunk-PGZDQT74.mjs";
17
- import "../chunk-DMAQBCTX.mjs";
18
- import "../chunk-5ASYNEHX.mjs";
19
- import "../chunk-A7J4KGLP.mjs";
20
- import "../chunk-MWFHYCQB.mjs";
21
- import "../chunk-KZME7C5S.mjs";
22
- import "../chunk-FWTPMPSN.mjs";
23
- import "../chunk-54JAUBUJ.mjs";
24
- import "../chunk-SKC7AJIV.mjs";
3
+ } from "../chunk-LTCJCXCP.mjs";
4
+ import "../chunk-MRXNTQOX.mjs";
25
5
  export {
26
6
  useCopilotChatSuggestions
27
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useCopyToClipboard
3
3
  } from "../chunk-54JAUBUJ.mjs";
4
- import "../chunk-SKC7AJIV.mjs";
4
+ import "../chunk-MRXNTQOX.mjs";
5
5
  export {
6
6
  useCopyToClipboard
7
7
  };
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { Message } from '@copilotkit/shared';
3
+
4
+ declare const checkMicrophonePermission: () => Promise<boolean | undefined>;
5
+ declare const requestMicAndPlaybackPermission: () => Promise<{
6
+ stream: MediaStream;
7
+ audioContext: AudioContext;
8
+ } | null>;
9
+ type PushToTalkState = "idle" | "recording" | "transcribing";
10
+ type SendFunction = (text: string) => Promise<Message>;
11
+ declare const usePushToTalk: ({ sendFunction, inProgress, }: {
12
+ sendFunction: SendFunction;
13
+ inProgress: boolean;
14
+ }) => {
15
+ pushToTalkState: PushToTalkState;
16
+ setPushToTalkState: React.Dispatch<React.SetStateAction<PushToTalkState>>;
17
+ };
18
+
19
+ export { PushToTalkState, SendFunction, checkMicrophonePermission, requestMicAndPlaybackPermission, usePushToTalk };
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __async = (__this, __arguments, generator) => {
20
+ return new Promise((resolve, reject) => {
21
+ var fulfilled = (value) => {
22
+ try {
23
+ step(generator.next(value));
24
+ } catch (e) {
25
+ reject(e);
26
+ }
27
+ };
28
+ var rejected = (value) => {
29
+ try {
30
+ step(generator.throw(value));
31
+ } catch (e) {
32
+ reject(e);
33
+ }
34
+ };
35
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
36
+ step((generator = generator.apply(__this, __arguments)).next());
37
+ });
38
+ };
39
+
40
+ // src/hooks/use-push-to-talk.tsx
41
+ var use_push_to_talk_exports = {};
42
+ __export(use_push_to_talk_exports, {
43
+ checkMicrophonePermission: () => checkMicrophonePermission,
44
+ requestMicAndPlaybackPermission: () => requestMicAndPlaybackPermission,
45
+ usePushToTalk: () => usePushToTalk
46
+ });
47
+ module.exports = __toCommonJS(use_push_to_talk_exports);
48
+ var import_react_core = require("@copilotkit/react-core");
49
+ var import_react = require("react");
50
+ var checkMicrophonePermission = () => __async(void 0, null, function* () {
51
+ try {
52
+ const permissionStatus = yield navigator.permissions.query({
53
+ name: "microphone"
54
+ });
55
+ if (permissionStatus.state === "granted") {
56
+ return true;
57
+ } else {
58
+ return false;
59
+ }
60
+ } catch (err) {
61
+ console.error("Error checking microphone permission", err);
62
+ }
63
+ });
64
+ var requestMicAndPlaybackPermission = () => __async(void 0, null, function* () {
65
+ try {
66
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
67
+ const audioContext = new window.AudioContext();
68
+ yield audioContext.resume();
69
+ return { stream, audioContext };
70
+ } catch (err) {
71
+ console.error("Error requesting microphone and playback permissions", err);
72
+ return null;
73
+ }
74
+ });
75
+ var startRecording = (mediaStreamRef, mediaRecorderRef, audioContextRef, recordedChunks, onStop) => __async(void 0, null, function* () {
76
+ if (!mediaStreamRef.current || !audioContextRef.current) {
77
+ mediaStreamRef.current = yield navigator.mediaDevices.getUserMedia({ audio: true });
78
+ audioContextRef.current = new window.AudioContext();
79
+ yield audioContextRef.current.resume();
80
+ }
81
+ mediaRecorderRef.current = new MediaRecorder(mediaStreamRef.current);
82
+ mediaRecorderRef.current.start(1e3);
83
+ mediaRecorderRef.current.ondataavailable = (event) => {
84
+ recordedChunks.push(event.data);
85
+ };
86
+ mediaRecorderRef.current.onstop = onStop;
87
+ });
88
+ var stopRecording = (mediaRecorderRef) => {
89
+ if (mediaRecorderRef.current && mediaRecorderRef.current.state !== "inactive") {
90
+ mediaRecorderRef.current.stop();
91
+ }
92
+ };
93
+ var transcribeAudio = (recordedChunks, transcribeAudioUrl) => __async(void 0, null, function* () {
94
+ const completeBlob = new Blob(recordedChunks, { type: "audio/mp4" });
95
+ const formData = new FormData();
96
+ formData.append("file", completeBlob, "recording.mp4");
97
+ const response = yield fetch(transcribeAudioUrl, {
98
+ method: "POST",
99
+ body: formData
100
+ });
101
+ if (!response.ok) {
102
+ throw new Error(`Error: ${response.statusText}`);
103
+ }
104
+ const transcription = yield response.json();
105
+ return transcription.text;
106
+ });
107
+ var playAudioResponse = (text, textToSpeechUrl, audioContext) => {
108
+ const encodedText = encodeURIComponent(text);
109
+ const url = `${textToSpeechUrl}?text=${encodedText}`;
110
+ fetch(url).then((response) => response.arrayBuffer()).then((arrayBuffer) => audioContext.decodeAudioData(arrayBuffer)).then((audioBuffer) => {
111
+ const source = audioContext.createBufferSource();
112
+ source.buffer = audioBuffer;
113
+ source.connect(audioContext.destination);
114
+ source.start(0);
115
+ }).catch((error) => {
116
+ console.error("Error with decoding audio data", error);
117
+ });
118
+ };
119
+ var usePushToTalk = ({
120
+ sendFunction,
121
+ inProgress
122
+ }) => {
123
+ const [pushToTalkState, setPushToTalkState] = (0, import_react.useState)("idle");
124
+ const mediaStreamRef = (0, import_react.useRef)(null);
125
+ const audioContextRef = (0, import_react.useRef)(null);
126
+ const mediaRecorderRef = (0, import_react.useRef)(null);
127
+ const recordedChunks = (0, import_react.useRef)([]);
128
+ const context = (0, import_react_core.useCopilotContext)();
129
+ const [startReadingFromMessageId, setStartReadingFromMessageId] = (0, import_react.useState)(null);
130
+ (0, import_react.useEffect)(() => {
131
+ if (pushToTalkState === "recording") {
132
+ startRecording(
133
+ mediaStreamRef,
134
+ mediaRecorderRef,
135
+ audioContextRef,
136
+ recordedChunks.current,
137
+ () => {
138
+ setPushToTalkState("transcribing");
139
+ }
140
+ );
141
+ } else {
142
+ stopRecording(mediaRecorderRef);
143
+ if (pushToTalkState === "transcribing") {
144
+ transcribeAudio(recordedChunks.current, context.copilotApiConfig.transcribeAudioUrl).then(
145
+ (transcription) => __async(void 0, null, function* () {
146
+ recordedChunks.current = [];
147
+ setPushToTalkState("idle");
148
+ const message = yield sendFunction(transcription);
149
+ setStartReadingFromMessageId(message.id);
150
+ })
151
+ );
152
+ }
153
+ }
154
+ return () => {
155
+ stopRecording(mediaRecorderRef);
156
+ };
157
+ }, [pushToTalkState]);
158
+ (0, import_react.useEffect)(() => {
159
+ if (inProgress === false && startReadingFromMessageId) {
160
+ const lastMessageIndex = context.messages.findIndex(
161
+ (message) => message.id === startReadingFromMessageId
162
+ );
163
+ const messagesAfterLast = context.messages.slice(lastMessageIndex + 1).filter((message) => message.role === "assistant" && message.content);
164
+ const text = messagesAfterLast.map((message) => message.content).join("\n");
165
+ playAudioResponse(text, context.copilotApiConfig.textToSpeechUrl, audioContextRef.current);
166
+ setStartReadingFromMessageId(null);
167
+ }
168
+ }, [startReadingFromMessageId, inProgress]);
169
+ return { pushToTalkState, setPushToTalkState };
170
+ };
171
+ // Annotate the CommonJS export names for ESM import in node:
172
+ 0 && (module.exports = {
173
+ checkMicrophonePermission,
174
+ requestMicAndPlaybackPermission,
175
+ usePushToTalk
176
+ });
177
+ //# sourceMappingURL=use-push-to-talk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-push-to-talk.tsx"],"sourcesContent":["import { CopilotContextParams, useCopilotContext } from \"@copilotkit/react-core\";\nimport { Message } from \"@copilotkit/shared\";\nimport { MutableRefObject, useEffect, useRef, useState } from \"react\";\n\nexport const checkMicrophonePermission = async () => {\n try {\n const permissionStatus = await navigator.permissions.query({\n name: \"microphone\" as PermissionName,\n });\n if (permissionStatus.state === \"granted\") {\n return true;\n } else {\n return false;\n }\n } catch (err) {\n console.error(\"Error checking microphone permission\", err);\n }\n};\n\nexport const requestMicAndPlaybackPermission = async () => {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const audioContext = new window.AudioContext();\n await audioContext.resume();\n return { stream, audioContext };\n } catch (err) {\n console.error(\"Error requesting microphone and playback permissions\", err);\n return null;\n }\n};\n\nconst startRecording = async (\n mediaStreamRef: MutableRefObject<MediaStream | null>,\n mediaRecorderRef: MutableRefObject<MediaRecorder | null>,\n audioContextRef: MutableRefObject<AudioContext | null>,\n recordedChunks: Blob[],\n onStop: () => void,\n) => {\n if (!mediaStreamRef.current || !audioContextRef.current) {\n mediaStreamRef.current = await navigator.mediaDevices.getUserMedia({ audio: true });\n audioContextRef.current = new window.AudioContext();\n await audioContextRef.current.resume();\n }\n\n mediaRecorderRef.current = new MediaRecorder(mediaStreamRef.current!);\n mediaRecorderRef.current.start(1000);\n mediaRecorderRef.current.ondataavailable = (event) => {\n recordedChunks.push(event.data);\n };\n mediaRecorderRef.current.onstop = onStop;\n};\n\nconst stopRecording = (mediaRecorderRef: MutableRefObject<MediaRecorder | null>) => {\n if (mediaRecorderRef.current && mediaRecorderRef.current.state !== \"inactive\") {\n mediaRecorderRef.current.stop();\n }\n};\n\nconst transcribeAudio = async (recordedChunks: Blob[], transcribeAudioUrl: string) => {\n const completeBlob = new Blob(recordedChunks, { type: \"audio/mp4\" });\n const formData = new FormData();\n formData.append(\"file\", completeBlob, \"recording.mp4\");\n\n const response = await fetch(transcribeAudioUrl, {\n method: \"POST\",\n body: formData,\n });\n\n if (!response.ok) {\n throw new Error(`Error: ${response.statusText}`);\n }\n\n const transcription = await response.json();\n return transcription.text;\n};\n\nconst playAudioResponse = (text: string, textToSpeechUrl: string, audioContext: AudioContext) => {\n const encodedText = encodeURIComponent(text);\n const url = `${textToSpeechUrl}?text=${encodedText}`;\n\n fetch(url)\n .then((response) => response.arrayBuffer())\n .then((arrayBuffer) => audioContext.decodeAudioData(arrayBuffer))\n .then((audioBuffer) => {\n const source = audioContext.createBufferSource();\n source.buffer = audioBuffer;\n source.connect(audioContext.destination);\n source.start(0);\n })\n .catch((error) => {\n console.error(\"Error with decoding audio data\", error);\n });\n};\n\nexport type PushToTalkState = \"idle\" | \"recording\" | \"transcribing\";\n\nexport type SendFunction = (text: string) => Promise<Message>;\n\nexport const usePushToTalk = ({\n sendFunction,\n inProgress,\n}: {\n sendFunction: SendFunction;\n inProgress: boolean;\n}) => {\n const [pushToTalkState, setPushToTalkState] = useState<PushToTalkState>(\"idle\");\n const mediaStreamRef = useRef<MediaStream | null>(null);\n const audioContextRef = useRef<AudioContext | null>(null);\n const mediaRecorderRef = useRef<MediaRecorder | null>(null);\n const recordedChunks = useRef<Blob[]>([]);\n const context = useCopilotContext();\n const [startReadingFromMessageId, setStartReadingFromMessageId] = useState<string | null>(null);\n\n useEffect(() => {\n if (pushToTalkState === \"recording\") {\n startRecording(\n mediaStreamRef,\n mediaRecorderRef,\n audioContextRef,\n recordedChunks.current,\n () => {\n setPushToTalkState(\"transcribing\");\n },\n );\n } else {\n stopRecording(mediaRecorderRef);\n if (pushToTalkState === \"transcribing\") {\n transcribeAudio(recordedChunks.current, context.copilotApiConfig.transcribeAudioUrl!).then(\n async (transcription) => {\n recordedChunks.current = [];\n setPushToTalkState(\"idle\");\n const message = await sendFunction(transcription);\n setStartReadingFromMessageId(message.id);\n },\n );\n }\n }\n\n return () => {\n stopRecording(mediaRecorderRef);\n };\n }, [pushToTalkState]);\n\n useEffect(() => {\n if (inProgress === false && startReadingFromMessageId) {\n const lastMessageIndex = context.messages.findIndex(\n (message) => message.id === startReadingFromMessageId,\n );\n\n const messagesAfterLast = context.messages\n .slice(lastMessageIndex + 1)\n .filter((message) => message.role === \"assistant\" && message.content);\n\n const text = messagesAfterLast.map((message) => message.content).join(\"\\n\");\n playAudioResponse(text, context.copilotApiConfig.textToSpeechUrl!, audioContextRef.current!);\n\n setStartReadingFromMessageId(null);\n }\n }, [startReadingFromMessageId, inProgress]);\n\n return { pushToTalkState, setPushToTalkState };\n};\n"],"mappings":"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","names":[]}
@@ -0,0 +1,12 @@
1
+ import {
2
+ checkMicrophonePermission,
3
+ requestMicAndPlaybackPermission,
4
+ usePushToTalk
5
+ } from "../chunk-ANO23V2M.mjs";
6
+ import "../chunk-MRXNTQOX.mjs";
7
+ export {
8
+ checkMicrophonePermission,
9
+ requestMicAndPlaybackPermission,
10
+ usePushToTalk
11
+ };
12
+ //# sourceMappingURL=use-push-to-talk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}