@copilotkit/react-ui 0.0.0-fix-restore-handle-method-node-http-20251222114321 → 0.0.0-fix-runtime-openai-api-key-passthrough-20260115003142

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 (44) hide show
  1. package/CHANGELOG.md +65 -113
  2. package/LICENSE +21 -0
  3. package/dist/{chunk-NGJ32FAP.mjs → chunk-6TWQUA2Q.mjs} +4 -3
  4. package/dist/chunk-6TWQUA2Q.mjs.map +1 -0
  5. package/dist/{chunk-7PR2KJDO.mjs → chunk-BVKKSSB2.mjs} +2 -2
  6. package/dist/{chunk-LQEFRHRT.mjs → chunk-DI7DDMRS.mjs} +2 -2
  7. package/dist/{chunk-QPQRLXN3.mjs → chunk-NSJWSIPR.mjs} +2 -2
  8. package/dist/{chunk-QB3GUN2N.mjs → chunk-VHKHX7GV.mjs} +2 -2
  9. package/dist/{chunk-ELUJRANC.mjs → chunk-VVCCMYGT.mjs} +2 -2
  10. package/dist/components/chat/Chat.js +3 -2
  11. package/dist/components/chat/Chat.js.map +1 -1
  12. package/dist/components/chat/Chat.mjs +3 -3
  13. package/dist/components/chat/Modal.js +3 -2
  14. package/dist/components/chat/Modal.js.map +1 -1
  15. package/dist/components/chat/Modal.mjs +4 -4
  16. package/dist/components/chat/Popup.js +3 -2
  17. package/dist/components/chat/Popup.js.map +1 -1
  18. package/dist/components/chat/Popup.mjs +5 -5
  19. package/dist/components/chat/Sidebar.js +3 -2
  20. package/dist/components/chat/Sidebar.js.map +1 -1
  21. package/dist/components/chat/Sidebar.mjs +5 -5
  22. package/dist/components/chat/Suggestion.js +3 -2
  23. package/dist/components/chat/Suggestion.js.map +1 -1
  24. package/dist/components/chat/Suggestion.mjs +1 -1
  25. package/dist/components/chat/Suggestions.js +3 -2
  26. package/dist/components/chat/Suggestions.js.map +1 -1
  27. package/dist/components/chat/Suggestions.mjs +2 -2
  28. package/dist/components/chat/index.js +3 -2
  29. package/dist/components/chat/index.js.map +1 -1
  30. package/dist/components/chat/index.mjs +6 -6
  31. package/dist/components/index.js +3 -2
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/index.mjs +6 -6
  34. package/dist/index.js +3 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.mjs +6 -6
  37. package/package.json +9 -6
  38. package/src/components/chat/Suggestion.tsx +3 -2
  39. package/dist/chunk-NGJ32FAP.mjs.map +0 -1
  40. /package/dist/{chunk-7PR2KJDO.mjs.map → chunk-BVKKSSB2.mjs.map} +0 -0
  41. /package/dist/{chunk-LQEFRHRT.mjs.map → chunk-DI7DDMRS.mjs.map} +0 -0
  42. /package/dist/{chunk-QPQRLXN3.mjs.map → chunk-NSJWSIPR.mjs.map} +0 -0
  43. /package/dist/{chunk-QB3GUN2N.mjs.map → chunk-VHKHX7GV.mjs.map} +0 -0
  44. /package/dist/{chunk-ELUJRANC.mjs.map → chunk-VVCCMYGT.mjs.map} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Atai Barkai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -6,9 +6,9 @@ import {
6
6
  import { useCopilotChatInternal } from "@copilotkit/react-core";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  function Suggestion({ title, onClick, partial, className }) {
9
+ const { isLoading } = useCopilotChatInternal();
9
10
  if (!title)
10
11
  return null;
11
- const { isLoading } = useCopilotChatInternal();
12
12
  return /* @__PURE__ */ jsx(
13
13
  "button",
14
14
  {
@@ -17,8 +17,9 @@ function Suggestion({ title, onClick, partial, className }) {
17
17
  e.preventDefault();
18
18
  onClick();
19
19
  },
20
- className: className || (partial ? "suggestion loading" : "suggestion"),
20
+ className: `suggestion ${className != null ? className : ""} ${partial ? "loading" : ""}`,
21
21
  "data-test-id": "suggestion",
22
+ type: "button",
22
23
  children: partial ? SmallSpinnerIcon : /* @__PURE__ */ jsx("span", { children: title })
23
24
  }
24
25
  );
@@ -27,4 +28,4 @@ function Suggestion({ title, onClick, partial, className }) {
27
28
  export {
28
29
  Suggestion
29
30
  };
30
- //# sourceMappingURL=chunk-NGJ32FAP.mjs.map
31
+ //# sourceMappingURL=chunk-6TWQUA2Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/chat/Suggestion.tsx"],"sourcesContent":["import { useCopilotChatInternal } from \"@copilotkit/react-core\";\nimport { SmallSpinnerIcon } from \"./Icons\";\n\ninterface SuggestionsProps {\n title: string;\n message: string;\n partial?: boolean;\n className?: string;\n onClick: () => void;\n}\n\nexport function Suggestion({ title, onClick, partial, className }: SuggestionsProps) {\n const { isLoading } = useCopilotChatInternal();\n if (!title) return null;\n\n return (\n <button\n disabled={partial || isLoading}\n onClick={(e) => {\n e.preventDefault();\n onClick();\n }}\n className={`suggestion ${className ?? \"\"} ${partial ? \"loading\" : \"\"}`}\n data-test-id=\"suggestion\"\n type=\"button\"\n >\n {partial ? SmallSpinnerIcon : <span>{title}</span>}\n </button>\n );\n}\n"],"mappings":";;;;;AAAA,SAAS,8BAA8B;AA0BH;AAf7B,SAAS,WAAW,EAAE,OAAO,SAAS,SAAS,UAAU,GAAqB;AACnF,QAAM,EAAE,UAAU,IAAI,uBAAuB;AAC7C,MAAI,CAAC;AAAO,WAAO;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,WAAW;AAAA,MACrB,SAAS,CAAC,MAAM;AACd,UAAE,eAAe;AACjB,gBAAQ;AAAA,MACV;AAAA,MACA,WAAW,cAAc,gCAAa,MAAM,UAAU,YAAY;AAAA,MAClE,gBAAa;AAAA,MACb,MAAK;AAAA,MAEJ,oBAAU,mBAAmB,oBAAC,UAAM,iBAAM;AAAA;AAAA,EAC7C;AAEJ;","names":[]}
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-UFN2VWSR.mjs";
10
10
  import {
11
11
  CopilotChat
12
- } from "./chunk-QPQRLXN3.mjs";
12
+ } from "./chunk-NSJWSIPR.mjs";
13
13
  import {
14
14
  Input
15
15
  } from "./chunk-3W6J75HS.mjs";
@@ -219,4 +219,4 @@ var CopilotModal = (_a) => {
219
219
  export {
220
220
  CopilotModal
221
221
  };
222
- //# sourceMappingURL=chunk-7PR2KJDO.mjs.map
222
+ //# sourceMappingURL=chunk-BVKKSSB2.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "./chunk-7PR2KJDO.mjs";
3
+ } from "./chunk-BVKKSSB2.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -27,4 +27,4 @@ function CopilotSidebar(props) {
27
27
  export {
28
28
  CopilotSidebar
29
29
  };
30
- //# sourceMappingURL=chunk-LQEFRHRT.mjs.map
30
+ //# sourceMappingURL=chunk-DI7DDMRS.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Suggestions
3
- } from "./chunk-QB3GUN2N.mjs";
3
+ } from "./chunk-VHKHX7GV.mjs";
4
4
  import {
5
5
  ImageUploadQueue
6
6
  } from "./chunk-PLHTVHUW.mjs";
@@ -432,4 +432,4 @@ export {
432
432
  CopilotChat,
433
433
  WrappedCopilotChat
434
434
  };
435
- //# sourceMappingURL=chunk-QPQRLXN3.mjs.map
435
+ //# sourceMappingURL=chunk-NSJWSIPR.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Suggestion
3
- } from "./chunk-NGJ32FAP.mjs";
3
+ } from "./chunk-6TWQUA2Q.mjs";
4
4
 
5
5
  // src/components/chat/Suggestions.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -28,4 +28,4 @@ function Suggestions({
28
28
  export {
29
29
  Suggestions
30
30
  };
31
- //# sourceMappingURL=chunk-QB3GUN2N.mjs.map
31
+ //# sourceMappingURL=chunk-VHKHX7GV.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotModal
3
- } from "./chunk-7PR2KJDO.mjs";
3
+ } from "./chunk-BVKKSSB2.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -18,4 +18,4 @@ function CopilotPopup(props) {
18
18
  export {
19
19
  CopilotPopup
20
20
  };
21
- //# sourceMappingURL=chunk-ELUJRANC.mjs.map
21
+ //# sourceMappingURL=chunk-VVCCMYGT.mjs.map
@@ -1839,9 +1839,9 @@ var ImageUploadQueue = ({
1839
1839
  var import_react_core4 = require("@copilotkit/react-core");
1840
1840
  var import_jsx_runtime15 = require("react/jsx-runtime");
1841
1841
  function Suggestion({ title, onClick, partial, className }) {
1842
+ const { isLoading } = (0, import_react_core4.useCopilotChatInternal)();
1842
1843
  if (!title)
1843
1844
  return null;
1844
- const { isLoading } = (0, import_react_core4.useCopilotChatInternal)();
1845
1845
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1846
1846
  "button",
1847
1847
  {
@@ -1850,8 +1850,9 @@ function Suggestion({ title, onClick, partial, className }) {
1850
1850
  e.preventDefault();
1851
1851
  onClick();
1852
1852
  },
1853
- className: className || (partial ? "suggestion loading" : "suggestion"),
1853
+ className: `suggestion ${className != null ? className : ""} ${partial ? "loading" : ""}`,
1854
1854
  "data-test-id": "suggestion",
1855
+ type: "button",
1855
1856
  children: partial ? SmallSpinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: title })
1856
1857
  }
1857
1858
  );