@copilotkit/react-ui 0.10.0-alpha.4 → 0.10.0-alpha.5

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 (89) hide show
  1. package/.turbo/turbo-build.log +180 -88
  2. package/CHANGELOG.md +11 -0
  3. package/dist/components/chat-components/chat-list.js +470 -0
  4. package/dist/components/chat-components/chat-list.js.map +1 -0
  5. package/dist/components/chat-components/chat-message-actions.js +188 -0
  6. package/dist/components/chat-components/chat-message-actions.js.map +1 -0
  7. package/dist/components/chat-components/chat-message.js +431 -0
  8. package/dist/components/chat-components/chat-message.js.map +1 -0
  9. package/dist/components/chat-components/chat-panel.js +330 -0
  10. package/dist/components/chat-components/chat-panel.js.map +1 -0
  11. package/dist/components/chat-components/chat-scroll-anchor.js +65 -0
  12. package/dist/components/chat-components/chat-scroll-anchor.js.map +1 -0
  13. package/dist/components/chat-components/clear-history.js +323 -0
  14. package/dist/components/chat-components/clear-history.js.map +1 -0
  15. package/dist/components/chat-components/copilot-chat.js +876 -0
  16. package/dist/components/chat-components/copilot-chat.js.map +1 -0
  17. package/dist/components/chat-components/default-empty-screen.js +211 -0
  18. package/dist/components/chat-components/default-empty-screen.js.map +1 -0
  19. package/dist/components/chat-components/external-link.js +35 -0
  20. package/dist/components/chat-components/external-link.js.map +1 -0
  21. package/dist/components/chat-components/markdown.js +14 -0
  22. package/dist/components/chat-components/markdown.js.map +1 -0
  23. package/dist/components/chat-components/prompt-form.js +245 -0
  24. package/dist/components/chat-components/prompt-form.js.map +1 -0
  25. package/dist/components/chat-components/theme-toggle.js +158 -0
  26. package/dist/components/chat-components/theme-toggle.js.map +1 -0
  27. package/dist/components/chat-components/toaster.js +12 -0
  28. package/dist/components/chat-components/toaster.js.map +1 -0
  29. package/dist/components/chat-components/ui/alert-dialog.js +229 -0
  30. package/dist/components/chat-components/ui/alert-dialog.js.map +1 -0
  31. package/dist/components/chat-components/ui/badge.js +70 -0
  32. package/dist/components/chat-components/ui/badge.js.map +1 -0
  33. package/dist/components/chat-components/ui/button.js +105 -0
  34. package/dist/components/chat-components/ui/button.js.map +1 -0
  35. package/dist/components/chat-components/ui/codeblock.js +299 -0
  36. package/dist/components/chat-components/ui/codeblock.js.map +1 -0
  37. package/dist/components/chat-components/ui/dialog.js +198 -0
  38. package/dist/components/chat-components/ui/dialog.js.map +1 -0
  39. package/dist/components/chat-components/ui/dropdown-menu.js +153 -0
  40. package/dist/components/chat-components/ui/dropdown-menu.js.map +1 -0
  41. package/dist/components/chat-components/ui/icons.js +567 -0
  42. package/dist/components/chat-components/ui/icons.js.map +1 -0
  43. package/dist/components/chat-components/ui/input.js +80 -0
  44. package/dist/components/chat-components/ui/input.js.map +1 -0
  45. package/dist/components/chat-components/ui/label.js +80 -0
  46. package/dist/components/chat-components/ui/label.js.map +1 -0
  47. package/dist/components/chat-components/ui/select.js +196 -0
  48. package/dist/components/chat-components/ui/select.js.map +1 -0
  49. package/dist/components/chat-components/ui/separator.js +84 -0
  50. package/dist/components/chat-components/ui/separator.js.map +1 -0
  51. package/dist/components/chat-components/ui/sheet.js +189 -0
  52. package/dist/components/chat-components/ui/sheet.js.map +1 -0
  53. package/dist/components/chat-components/ui/switch.js +88 -0
  54. package/dist/components/chat-components/ui/switch.js.map +1 -0
  55. package/dist/components/chat-components/ui/textarea.js +79 -0
  56. package/dist/components/chat-components/ui/textarea.js.map +1 -0
  57. package/dist/components/chat-components/ui/tooltip.js +86 -0
  58. package/dist/components/chat-components/ui/tooltip.js.map +1 -0
  59. package/dist/components/index.js +989 -0
  60. package/dist/components/index.js.map +1 -0
  61. package/dist/components/sidebar/copilot-sidebar-ui-provider.js +984 -0
  62. package/dist/components/sidebar/copilot-sidebar-ui-provider.js.map +1 -0
  63. package/dist/components/sidebar/copilot-sidebar.js +916 -0
  64. package/dist/components/sidebar/copilot-sidebar.js.map +1 -0
  65. package/dist/components/sidebar/sidebar-context.js +14 -0
  66. package/dist/components/sidebar/sidebar-context.js.map +1 -0
  67. package/dist/context/index.js +4 -0
  68. package/dist/context/index.js.map +1 -0
  69. package/dist/hooks/index.js +4 -0
  70. package/dist/hooks/index.js.map +1 -0
  71. package/dist/hooks/use-at-bottom.js +44 -0
  72. package/dist/hooks/use-at-bottom.js.map +1 -0
  73. package/dist/hooks/use-copy-to-clipboard.js +49 -0
  74. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  75. package/dist/hooks/use-enter-submit.js +20 -0
  76. package/dist/hooks/use-enter-submit.js.map +1 -0
  77. package/dist/index.js +989 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/index.mjs +1 -1
  80. package/dist/lib/utils.js +64 -0
  81. package/dist/lib/utils.js.map +1 -0
  82. package/dist/lib/utils.test.js +10 -0
  83. package/dist/lib/utils.test.js.map +1 -0
  84. package/dist/types/index.js +4 -0
  85. package/dist/types/index.js.map +1 -0
  86. package/dist/types/types.js +4 -0
  87. package/dist/types/types.js.map +1 -0
  88. package/package.json +4 -4
  89. package/tsup.config.ts +1 -1
@@ -0,0 +1,876 @@
1
+ 'use strict';
2
+
3
+ var React6 = require('react');
4
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
5
+ var clsx = require('clsx');
6
+ var nanoid = require('nanoid');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ var remarkGfm = require('remark-gfm');
10
+ var remarkMath = require('remark-math');
11
+ var reactSyntaxHighlighter = require('react-syntax-highlighter');
12
+ var reactSlot = require('@radix-ui/react-slot');
13
+ var classVarianceAuthority = require('class-variance-authority');
14
+ var ReactMarkdown = require('react-markdown');
15
+ var TextareaAutosize = require('react-textarea-autosize');
16
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
17
+ var reactIntersectionObserver = require('react-intersection-observer');
18
+ var reactCore = require('@copilotkit/react-core');
19
+
20
+ function _interopNamespaceDefault(e) {
21
+ var n = Object.create(null);
22
+ if (e) {
23
+ Object.keys(e).forEach(function (k) {
24
+ if (k !== 'default') {
25
+ var d = Object.getOwnPropertyDescriptor(e, k);
26
+ Object.defineProperty(n, k, d.get ? d : {
27
+ enumerable: true,
28
+ get: function () { return e[k]; }
29
+ });
30
+ }
31
+ });
32
+ }
33
+ n.default = e;
34
+ return Object.freeze(n);
35
+ }
36
+
37
+ var React6__namespace = /*#__PURE__*/_interopNamespaceDefault(React6);
38
+ var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SeparatorPrimitive);
39
+ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TooltipPrimitive);
40
+
41
+ var __defProp = Object.defineProperty;
42
+ var __defProps = Object.defineProperties;
43
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
44
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
45
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
46
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
47
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
48
+ var __spreadValues = (a, b) => {
49
+ for (var prop in b || (b = {}))
50
+ if (__hasOwnProp.call(b, prop))
51
+ __defNormalProp(a, prop, b[prop]);
52
+ if (__getOwnPropSymbols)
53
+ for (var prop of __getOwnPropSymbols(b)) {
54
+ if (__propIsEnum.call(b, prop))
55
+ __defNormalProp(a, prop, b[prop]);
56
+ }
57
+ return a;
58
+ };
59
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
60
+ var __objRest = (source, exclude) => {
61
+ var target = {};
62
+ for (var prop in source)
63
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
64
+ target[prop] = source[prop];
65
+ if (source != null && __getOwnPropSymbols)
66
+ for (var prop of __getOwnPropSymbols(source)) {
67
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
68
+ target[prop] = source[prop];
69
+ }
70
+ return target;
71
+ };
72
+ var __async = (__this, __arguments, generator) => {
73
+ return new Promise((resolve, reject) => {
74
+ var fulfilled = (value) => {
75
+ try {
76
+ step(generator.next(value));
77
+ } catch (e) {
78
+ reject(e);
79
+ }
80
+ };
81
+ var rejected = (value) => {
82
+ try {
83
+ step(generator.throw(value));
84
+ } catch (e) {
85
+ reject(e);
86
+ }
87
+ };
88
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
89
+ step((generator = generator.apply(__this, __arguments)).next());
90
+ });
91
+ };
92
+ function cn(...inputs) {
93
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
94
+ }
95
+ nanoid.customAlphabet(
96
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
97
+ 7
98
+ );
99
+ var Separator = React6__namespace.forwardRef(
100
+ (_a, ref) => {
101
+ var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
102
+ return /* @__PURE__ */ jsxRuntime.jsx(SeparatorPrimitive__namespace.Root, __spreadValues({
103
+ ref,
104
+ decorative,
105
+ orientation,
106
+ className: cn(
107
+ "shrink-0 bg-border",
108
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
109
+ className
110
+ )
111
+ }, props));
112
+ }
113
+ );
114
+ Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
115
+ function useCopyToClipboard({
116
+ timeout = 2e3
117
+ }) {
118
+ const [isCopied, setIsCopied] = React6__namespace.useState(false);
119
+ const copyToClipboard = (value) => {
120
+ var _a;
121
+ if (typeof window === "undefined" || !((_a = navigator.clipboard) == null ? void 0 : _a.writeText)) {
122
+ return;
123
+ }
124
+ if (!value) {
125
+ return;
126
+ }
127
+ navigator.clipboard.writeText(value).then(() => {
128
+ setIsCopied(true);
129
+ setTimeout(() => {
130
+ setIsCopied(false);
131
+ }, timeout);
132
+ });
133
+ };
134
+ return { isCopied, copyToClipboard };
135
+ }
136
+ function IconOpenAI(_a) {
137
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
138
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", __spreadProps(__spreadValues({
139
+ fill: "currentColor",
140
+ viewBox: "0 0 24 24",
141
+ role: "img",
142
+ xmlns: "http://www.w3.org/2000/svg",
143
+ className: cn("h-4 w-4", className)
144
+ }, props), {
145
+ children: [
146
+ /* @__PURE__ */ jsxRuntime.jsx("title", {
147
+ children: "OpenAI icon"
148
+ }),
149
+ /* @__PURE__ */ jsxRuntime.jsx("path", {
150
+ d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"
151
+ })
152
+ ]
153
+ }));
154
+ }
155
+ function IconArrowRight(_a) {
156
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
157
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
158
+ xmlns: "http://www.w3.org/2000/svg",
159
+ viewBox: "0 0 256 256",
160
+ fill: "currentColor",
161
+ className: cn("h-4 w-4", className)
162
+ }, props), {
163
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
164
+ d: "m221.66 133.66-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z"
165
+ })
166
+ }));
167
+ }
168
+ function IconUser(_a) {
169
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
170
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
171
+ xmlns: "http://www.w3.org/2000/svg",
172
+ viewBox: "0 0 256 256",
173
+ fill: "currentColor",
174
+ className: cn("h-4 w-4", className)
175
+ }, props), {
176
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
177
+ d: "M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8ZM72 96a56 56 0 1 1 56 56 56.06 56.06 0 0 1-56-56Z"
178
+ })
179
+ }));
180
+ }
181
+ function IconArrowElbow(_a) {
182
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
183
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
184
+ xmlns: "http://www.w3.org/2000/svg",
185
+ viewBox: "0 0 256 256",
186
+ fill: "currentColor",
187
+ className: cn("h-4 w-4", className)
188
+ }, props), {
189
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
190
+ d: "M200 32v144a8 8 0 0 1-8 8H67.31l34.35 34.34a8 8 0 0 1-11.32 11.32l-48-48a8 8 0 0 1 0-11.32l48-48a8 8 0 0 1 11.32 11.32L67.31 168H184V32a8 8 0 0 1 16 0Z"
191
+ })
192
+ }));
193
+ }
194
+ function IconRefresh(_a) {
195
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
196
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
197
+ xmlns: "http://www.w3.org/2000/svg",
198
+ viewBox: "0 0 256 256",
199
+ fill: "currentColor",
200
+ className: cn("h-4 w-4", className)
201
+ }, props), {
202
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
203
+ d: "M197.67 186.37a8 8 0 0 1 0 11.29C196.58 198.73 170.82 224 128 224c-37.39 0-64.53-22.4-80-39.85V208a8 8 0 0 1-16 0v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16H55.44C67.76 183.35 93 208 128 208c36 0 58.14-21.46 58.36-21.68a8 8 0 0 1 11.31.05ZM216 40a8 8 0 0 0-8 8v23.85C192.53 54.4 165.39 32 128 32c-42.82 0-68.58 25.27-69.66 26.34a8 8 0 0 0 11.3 11.34C69.86 69.46 92 48 128 48c35 0 60.24 24.65 72.56 40H168a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"
204
+ })
205
+ }));
206
+ }
207
+ function IconStop(_a) {
208
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
209
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
210
+ xmlns: "http://www.w3.org/2000/svg",
211
+ viewBox: "0 0 256 256",
212
+ fill: "currentColor",
213
+ className: cn("h-4 w-4", className)
214
+ }, props), {
215
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
216
+ d: "M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm24-120h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8Zm-8 48h-32v-32h32Z"
217
+ })
218
+ }));
219
+ }
220
+ function IconCopy(_a) {
221
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
222
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
223
+ xmlns: "http://www.w3.org/2000/svg",
224
+ viewBox: "0 0 256 256",
225
+ fill: "currentColor",
226
+ className: cn("h-4 w-4", className)
227
+ }, props), {
228
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
229
+ d: "M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8Zm-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z"
230
+ })
231
+ }));
232
+ }
233
+ function IconCheck(_a) {
234
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
235
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
236
+ xmlns: "http://www.w3.org/2000/svg",
237
+ viewBox: "0 0 256 256",
238
+ fill: "currentColor",
239
+ className: cn("h-4 w-4", className)
240
+ }, props), {
241
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
242
+ d: "m229.66 77.66-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z"
243
+ })
244
+ }));
245
+ }
246
+ function IconDownload(_a) {
247
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
248
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({
249
+ xmlns: "http://www.w3.org/2000/svg",
250
+ viewBox: "0 0 256 256",
251
+ fill: "currentColor",
252
+ className: cn("h-4 w-4", className)
253
+ }, props), {
254
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
255
+ d: "M224 152v56a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16v-56a8 8 0 0 1 16 0v56h160v-56a8 8 0 0 1 16 0Zm-101.66 5.66a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0-11.32-11.32L136 132.69V40a8 8 0 0 0-16 0v92.69l-26.34-26.35a8 8 0 0 0-11.32 11.32Z"
256
+ })
257
+ }));
258
+ }
259
+ var buttonVariants = classVarianceAuthority.cva(
260
+ "inline-flex items-center justify-center rounded-md text-sm font-medium shadow ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
261
+ {
262
+ variants: {
263
+ variant: {
264
+ default: "bg-primary text-primary-foreground shadow-md hover:bg-primary/90",
265
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
266
+ outline: "border border-input hover:bg-accent hover:text-accent-foreground",
267
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
268
+ ghost: "shadow-none hover:bg-accent hover:text-accent-foreground",
269
+ link: "text-primary underline-offset-4 shadow-none hover:underline"
270
+ },
271
+ size: {
272
+ default: "h-8 px-4 py-2",
273
+ sm: "h-8 rounded-md px-3",
274
+ lg: "h-11 rounded-md px-8",
275
+ icon: "h-8 w-8 p-0"
276
+ }
277
+ },
278
+ defaultVariants: {
279
+ variant: "default",
280
+ size: "default"
281
+ }
282
+ }
283
+ );
284
+ var Button = React6__namespace.forwardRef(
285
+ (_a, ref) => {
286
+ var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
287
+ const Comp = asChild ? reactSlot.Slot : "button";
288
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, __spreadValues({
289
+ className: cn(buttonVariants({ variant, size, className })),
290
+ ref
291
+ }, props));
292
+ }
293
+ );
294
+ Button.displayName = "Button";
295
+ var programmingLanguages = {
296
+ javascript: ".js",
297
+ python: ".py",
298
+ java: ".java",
299
+ c: ".c",
300
+ cpp: ".cpp",
301
+ "c++": ".cpp",
302
+ "c#": ".cs",
303
+ ruby: ".rb",
304
+ php: ".php",
305
+ swift: ".swift",
306
+ "objective-c": ".m",
307
+ kotlin: ".kt",
308
+ typescript: ".ts",
309
+ go: ".go",
310
+ perl: ".pl",
311
+ rust: ".rs",
312
+ scala: ".scala",
313
+ haskell: ".hs",
314
+ lua: ".lua",
315
+ shell: ".sh",
316
+ sql: ".sql",
317
+ html: ".html",
318
+ css: ".css"
319
+ };
320
+ var generateRandomString = (length, lowercase = false) => {
321
+ const chars = "ABCDEFGHJKLMNPQRSTUVWXY3456789";
322
+ let result = "";
323
+ for (let i = 0; i < length; i++) {
324
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
325
+ }
326
+ return lowercase ? result.toLowerCase() : result;
327
+ };
328
+ var CodeBlock = React6.memo(({ language, value }) => {
329
+ const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2e3 });
330
+ const downloadAsFile = () => {
331
+ if (typeof window === "undefined") {
332
+ return;
333
+ }
334
+ const fileExtension = programmingLanguages[language] || ".file";
335
+ const suggestedFileName = `file-${generateRandomString(
336
+ 3,
337
+ true
338
+ )}${fileExtension}`;
339
+ const fileName = window.prompt("Enter file name", suggestedFileName);
340
+ if (!fileName) {
341
+ return;
342
+ }
343
+ const blob = new Blob([value], { type: "text/plain" });
344
+ const url = URL.createObjectURL(blob);
345
+ const link = document.createElement("a");
346
+ link.download = fileName;
347
+ link.href = url;
348
+ link.style.display = "none";
349
+ document.body.appendChild(link);
350
+ link.click();
351
+ document.body.removeChild(link);
352
+ URL.revokeObjectURL(url);
353
+ };
354
+ const onCopy = () => {
355
+ if (isCopied)
356
+ return;
357
+ copyToClipboard(value);
358
+ };
359
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
360
+ className: "codeblock relative w-full bg-zinc-950 font-sans",
361
+ children: [
362
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
363
+ className: "flex w-full items-center justify-between bg-zinc-800 px-6 py-2 pr-4 text-zinc-100",
364
+ children: [
365
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
366
+ className: "text-xs lowercase",
367
+ children: language
368
+ }),
369
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
370
+ className: "flex items-center space-x-1",
371
+ children: [
372
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, {
373
+ variant: "ghost",
374
+ className: "hover:bg-zinc-800 focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-0",
375
+ onClick: downloadAsFile,
376
+ size: "icon",
377
+ children: [
378
+ /* @__PURE__ */ jsxRuntime.jsx(IconDownload, {}),
379
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
380
+ className: "sr-only",
381
+ children: "Download"
382
+ })
383
+ ]
384
+ }),
385
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, {
386
+ variant: "ghost",
387
+ size: "icon",
388
+ className: "text-xs hover:bg-zinc-800 focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-0",
389
+ onClick: onCopy,
390
+ children: [
391
+ isCopied ? /* @__PURE__ */ jsxRuntime.jsx(IconCheck, {}) : /* @__PURE__ */ jsxRuntime.jsx(IconCopy, {}),
392
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
393
+ className: "sr-only",
394
+ children: "Copy code"
395
+ })
396
+ ]
397
+ })
398
+ ]
399
+ })
400
+ ]
401
+ }),
402
+ /* @__PURE__ */ jsxRuntime.jsx(reactSyntaxHighlighter.Prism, {
403
+ language,
404
+ PreTag: "div",
405
+ showLineNumbers: true,
406
+ customStyle: {
407
+ margin: 0,
408
+ width: "100%",
409
+ background: "transparent",
410
+ padding: "1.5rem 1rem"
411
+ },
412
+ codeTagProps: {
413
+ style: {
414
+ fontSize: "0.9rem",
415
+ fontFamily: "var(--font-mono)"
416
+ }
417
+ },
418
+ children: value
419
+ })
420
+ ]
421
+ });
422
+ });
423
+ CodeBlock.displayName = "CodeBlock";
424
+ var MemoizedReactMarkdown = React6.memo(
425
+ ReactMarkdown,
426
+ (prevProps, nextProps) => prevProps.children === nextProps.children && prevProps.className === nextProps.className
427
+ );
428
+ function ChatMessageActions(_a) {
429
+ var _b = _a, {
430
+ message,
431
+ className
432
+ } = _b, props = __objRest(_b, [
433
+ "message",
434
+ "className"
435
+ ]);
436
+ const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2e3 });
437
+ const onCopy = () => {
438
+ if (isCopied)
439
+ return;
440
+ copyToClipboard(message.content);
441
+ };
442
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({
443
+ className: cn(
444
+ "flex items-center justify-end transition-opacity group-hover:opacity-100 md:absolute md:-right-10 md:-top-2 md:opacity-0",
445
+ className
446
+ )
447
+ }, props), {
448
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Button, {
449
+ variant: "ghost",
450
+ size: "icon",
451
+ onClick: onCopy,
452
+ children: [
453
+ isCopied ? /* @__PURE__ */ jsxRuntime.jsx(IconCheck, {}) : /* @__PURE__ */ jsxRuntime.jsx(IconCopy, {}),
454
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
455
+ className: "sr-only",
456
+ children: "Copy message"
457
+ })
458
+ ]
459
+ })
460
+ }));
461
+ }
462
+ function ChatMessage(_a) {
463
+ var _b = _a, { message } = _b, props = __objRest(_b, ["message"]);
464
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", __spreadProps(__spreadValues({
465
+ className: cn("group relative mb-4 flex items-start")
466
+ }, props), {
467
+ children: [
468
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
469
+ className: cn(
470
+ "flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border shadow",
471
+ message.role === "user" ? "bg-background" : "bg-primary text-primary-foreground"
472
+ ),
473
+ children: message.role === "user" ? /* @__PURE__ */ jsxRuntime.jsx(IconUser, {}) : /* @__PURE__ */ jsxRuntime.jsx(IconOpenAI, {})
474
+ }),
475
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
476
+ className: "ml-4 flex-1 space-y-2 overflow-hidden px-1",
477
+ children: [
478
+ /* @__PURE__ */ jsxRuntime.jsx(MemoizedReactMarkdown, {
479
+ className: "prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 text-sm",
480
+ remarkPlugins: [remarkGfm, remarkMath],
481
+ components: {
482
+ p({ children }) {
483
+ return /* @__PURE__ */ jsxRuntime.jsx("p", {
484
+ className: "mb-2 last:mb-0",
485
+ children
486
+ });
487
+ },
488
+ code(_a2) {
489
+ var _b2 = _a2, { children, className, inline } = _b2, props2 = __objRest(_b2, ["children", "className", "inline"]);
490
+ if (children.length) {
491
+ if (children[0] == "\u258D") {
492
+ return /* @__PURE__ */ jsxRuntime.jsx("span", {
493
+ className: "mt-1 animate-pulse cursor-default",
494
+ children: "\u258D"
495
+ });
496
+ }
497
+ children[0] = children[0].replace("`\u258D`", "\u258D");
498
+ }
499
+ const match = /language-(\w+)/.exec(className || "");
500
+ if (inline) {
501
+ return /* @__PURE__ */ jsxRuntime.jsx("code", __spreadProps(__spreadValues({
502
+ className
503
+ }, props2), {
504
+ children
505
+ }));
506
+ }
507
+ return /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, __spreadValues({
508
+ language: match && match[1] || "",
509
+ value: String(children).replace(/\n$/, "")
510
+ }, props2), Math.random());
511
+ }
512
+ },
513
+ children: message.content
514
+ }),
515
+ /* @__PURE__ */ jsxRuntime.jsx(ChatMessageActions, {
516
+ message
517
+ })
518
+ ]
519
+ })
520
+ ]
521
+ }));
522
+ }
523
+ function ChatList({ messages }) {
524
+ const displayedMessages = messages.filter(
525
+ (message) => message.role !== "system"
526
+ );
527
+ if (!displayedMessages.length) {
528
+ return null;
529
+ }
530
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
531
+ className: "relative mx-auto max-w-2xl px-0",
532
+ children: displayedMessages.map((message, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
533
+ children: [
534
+ /* @__PURE__ */ jsxRuntime.jsx(ChatMessage, {
535
+ message
536
+ }),
537
+ index < displayedMessages.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, {
538
+ className: "my-4 md:my-4"
539
+ })
540
+ ]
541
+ }, index))
542
+ });
543
+ }
544
+ function useEnterSubmit() {
545
+ const formRef = React6.useRef(null);
546
+ const handleKeyDown = (event) => {
547
+ var _a;
548
+ if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
549
+ (_a = formRef.current) == null ? void 0 : _a.requestSubmit();
550
+ event.preventDefault();
551
+ }
552
+ };
553
+ return { formRef, onKeyDown: handleKeyDown };
554
+ }
555
+ var Tooltip = TooltipPrimitive__namespace.Root;
556
+ var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
557
+ var TooltipContent = React6__namespace.forwardRef((_a, ref) => {
558
+ var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
559
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Content, __spreadValues({
560
+ ref,
561
+ sideOffset,
562
+ className: cn(
563
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs font-medium text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
564
+ className
565
+ )
566
+ }, props));
567
+ });
568
+ TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
569
+ function PromptForm({
570
+ onSubmit,
571
+ input,
572
+ setInput,
573
+ isLoading
574
+ }) {
575
+ const { formRef, onKeyDown } = useEnterSubmit();
576
+ const inputRef = React6__namespace.useRef(null);
577
+ React6__namespace.useEffect(() => {
578
+ if (inputRef.current) {
579
+ inputRef.current.focus();
580
+ }
581
+ }, []);
582
+ return /* @__PURE__ */ jsxRuntime.jsx("form", {
583
+ onSubmit: (e) => __async(this, null, function* () {
584
+ e.preventDefault();
585
+ if (!(input == null ? void 0 : input.trim())) {
586
+ return;
587
+ }
588
+ setInput("");
589
+ yield onSubmit(input);
590
+ }),
591
+ ref: formRef,
592
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
593
+ className: "relative flex max-h-60 w-full grow flex-col overflow-hidden bg-background px-8 sm:rounded-md border sm:px-12",
594
+ children: [
595
+ /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, {
596
+ children: [
597
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, {
598
+ asChild: true
599
+ }),
600
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, {
601
+ children: "New Chat"
602
+ })
603
+ ]
604
+ }),
605
+ /* @__PURE__ */ jsxRuntime.jsx(TextareaAutosize, {
606
+ ref: inputRef,
607
+ tabIndex: 0,
608
+ onKeyDown,
609
+ rows: 1,
610
+ value: input,
611
+ onChange: (e) => setInput(e.target.value),
612
+ placeholder: "Send a message.",
613
+ spellCheck: false,
614
+ className: "min-h-[60px] w-full resize-none bg-transparent px-4 py-[1.3rem] focus-within:outline-none sm:text-sm"
615
+ }),
616
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
617
+ className: "absolute right-0 top-4 sm:right-4",
618
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, {
619
+ children: [
620
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, {
621
+ asChild: true,
622
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Button, {
623
+ type: "submit",
624
+ size: "icon",
625
+ disabled: isLoading || input === "",
626
+ className: " bg-slate-300",
627
+ children: [
628
+ /* @__PURE__ */ jsxRuntime.jsx(IconArrowElbow, {}),
629
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
630
+ className: "sr-only",
631
+ children: "Send message"
632
+ })
633
+ ]
634
+ })
635
+ }),
636
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, {
637
+ children: "Send message"
638
+ })
639
+ ]
640
+ })
641
+ })
642
+ ]
643
+ })
644
+ });
645
+ }
646
+ function ChatPanel({
647
+ id,
648
+ isLoading,
649
+ stop,
650
+ append,
651
+ reload,
652
+ input,
653
+ setInput,
654
+ messages
655
+ }) {
656
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
657
+ className: "inset-x-0 bottom-0 bg-gradient-to-b from-muted/10 from-10% to-muted/30 to-50% mt-4 mb-8",
658
+ style: { width: "100%", overflow: "hidden", boxSizing: "border-box" },
659
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
660
+ className: "mx-auto sm:max-w-2xl sm:px-4",
661
+ children: [
662
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
663
+ className: "flex h-10 items-center justify-center mb-4",
664
+ children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(Button, {
665
+ variant: "outline",
666
+ onClick: () => stop(),
667
+ className: "bg-background",
668
+ children: [
669
+ /* @__PURE__ */ jsxRuntime.jsx(IconStop, {
670
+ className: "mr-2"
671
+ }),
672
+ "Stop generating"
673
+ ]
674
+ }) : (messages == null ? void 0 : messages.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Button, {
675
+ variant: "outline",
676
+ onClick: () => reload(),
677
+ className: "bg-background",
678
+ children: [
679
+ /* @__PURE__ */ jsxRuntime.jsx(IconRefresh, {
680
+ className: "mr-2"
681
+ }),
682
+ "Regenerate response"
683
+ ]
684
+ })
685
+ }),
686
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
687
+ className: "space-y-4 border-2 bg-background px-4 py-2 shadow-lg sm:rounded-xl md:py-4",
688
+ children: /* @__PURE__ */ jsxRuntime.jsx(PromptForm, {
689
+ onSubmit: (value) => __async(this, null, function* () {
690
+ yield append({
691
+ id,
692
+ content: value,
693
+ role: "user"
694
+ });
695
+ }),
696
+ input,
697
+ setInput,
698
+ isLoading
699
+ })
700
+ })
701
+ ]
702
+ })
703
+ });
704
+ }
705
+ function ExternalLink({
706
+ href,
707
+ children
708
+ }) {
709
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", {
710
+ href,
711
+ target: "_blank",
712
+ className: "inline-flex flex-1 justify-center gap-1 leading-4 hover:underline",
713
+ children: [
714
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
715
+ children
716
+ }),
717
+ /* @__PURE__ */ jsxRuntime.jsx("svg", {
718
+ "aria-hidden": "true",
719
+ height: "7",
720
+ viewBox: "0 0 6 6",
721
+ width: "7",
722
+ className: "opacity-70",
723
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
724
+ d: "M1.25215 5.54731L0.622742 4.9179L3.78169 1.75597H1.3834L1.38936 0.890915H5.27615V4.78069H4.40513L4.41109 2.38538L1.25215 5.54731Z",
725
+ fill: "currentColor"
726
+ })
727
+ })
728
+ ]
729
+ });
730
+ }
731
+ var exampleMessages = [
732
+ {
733
+ heading: "Explain technical concepts",
734
+ message: `What is a "serverless function"?`
735
+ },
736
+ {
737
+ heading: "Summarize an article",
738
+ message: "Summarize the following article for a 2nd grader: \n"
739
+ },
740
+ {
741
+ heading: "Draft an email",
742
+ message: `Draft an email to my boss about the following:
743
+ `
744
+ }
745
+ ];
746
+ var DefaultEmptyScreen = (props) => {
747
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
748
+ className: "mx-auto max-w-2xl px-4",
749
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
750
+ className: "rounded-lg border bg-background p-8",
751
+ children: [
752
+ /* @__PURE__ */ jsxRuntime.jsx("h1", {
753
+ className: "mb-2 text-lg font-semibold",
754
+ children: "Welcome to CopilotKit! \u{1F44B}"
755
+ }),
756
+ /* @__PURE__ */ jsxRuntime.jsxs("p", {
757
+ className: "mb-2 leading-normal text-muted-foreground",
758
+ children: [
759
+ "This is a Copilot built with",
760
+ " ",
761
+ /* @__PURE__ */ jsxRuntime.jsx(ExternalLink, {
762
+ href: "https://recursively.ai",
763
+ children: "recursively.ai's"
764
+ }),
765
+ " ",
766
+ /* @__PURE__ */ jsxRuntime.jsx(ExternalLink, {
767
+ href: "https://github.com/RecursivelyAI/CopilotKit",
768
+ children: "CopilotKit"
769
+ }),
770
+ " ",
771
+ "."
772
+ ]
773
+ }),
774
+ /* @__PURE__ */ jsxRuntime.jsx("p", {
775
+ className: "leading-normal text-muted-foreground",
776
+ children: "You can start a conversation here or try the following examples:"
777
+ }),
778
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
779
+ className: "mt-4 flex flex-col items-start space-y-2",
780
+ children: exampleMessages.map((message, index) => /* @__PURE__ */ jsxRuntime.jsxs(Button, {
781
+ variant: "link",
782
+ className: "h-auto p-0 text-base",
783
+ onClick: () => props.setInput(message.message),
784
+ children: [
785
+ /* @__PURE__ */ jsxRuntime.jsx(IconArrowRight, {
786
+ className: "mr-2 text-muted-foreground"
787
+ }),
788
+ message.heading
789
+ ]
790
+ }, index))
791
+ })
792
+ ]
793
+ })
794
+ });
795
+ };
796
+ function useAtBottom(offset = 0) {
797
+ const [isAtBottom, setIsAtBottom] = React6__namespace.useState(false);
798
+ React6__namespace.useEffect(() => {
799
+ const handleScroll = () => {
800
+ setIsAtBottom(
801
+ window.innerHeight + window.scrollY >= document.body.offsetHeight - offset
802
+ );
803
+ };
804
+ window.addEventListener("scroll", handleScroll, { passive: true });
805
+ handleScroll();
806
+ return () => {
807
+ window.removeEventListener("scroll", handleScroll);
808
+ };
809
+ }, [offset]);
810
+ return isAtBottom;
811
+ }
812
+ function ChatScrollAnchor({ trackVisibility }) {
813
+ const isAtBottom = useAtBottom();
814
+ const { ref, entry, inView } = reactIntersectionObserver.useInView({
815
+ trackVisibility,
816
+ delay: 100,
817
+ rootMargin: "0px 0px -150px 0px"
818
+ });
819
+ React6__namespace.useEffect(() => {
820
+ if (isAtBottom && trackVisibility && !inView) {
821
+ entry == null ? void 0 : entry.target.scrollIntoView({
822
+ block: "start"
823
+ });
824
+ }
825
+ }, [inView, entry, isAtBottom, trackVisibility]);
826
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
827
+ ref,
828
+ className: "h-px w-full"
829
+ });
830
+ }
831
+ function CopilotChat({
832
+ id,
833
+ initialMessages,
834
+ makeSystemMessage,
835
+ EmptyScreen = DefaultEmptyScreen
836
+ }) {
837
+ const { visibleMessages, append, reload, stop, isLoading, input, setInput } = reactCore.useCopilotChat({ id, initialMessages, makeSystemMessage });
838
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
839
+ className: "w-full h-full flex flex-col overflow-hidden box-border items-start",
840
+ children: [
841
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
842
+ className: "pt-5 px-5 overflow-y-auto overflow-x-hidden w-full flex-grow",
843
+ children: visibleMessages.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
844
+ className: "pl-0 pr-6",
845
+ children: [
846
+ /* @__PURE__ */ jsxRuntime.jsx(ChatList, {
847
+ messages: visibleMessages
848
+ }),
849
+ /* @__PURE__ */ jsxRuntime.jsx(ChatScrollAnchor, {
850
+ trackVisibility: isLoading
851
+ })
852
+ ]
853
+ }) : /* @__PURE__ */ jsxRuntime.jsx(EmptyScreen, {
854
+ setInput
855
+ })
856
+ }),
857
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
858
+ className: "flex-shrink-0 w-full",
859
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChatPanel, {
860
+ id,
861
+ isLoading,
862
+ stop,
863
+ append,
864
+ reload,
865
+ messages: visibleMessages,
866
+ input,
867
+ setInput
868
+ })
869
+ })
870
+ ]
871
+ });
872
+ }
873
+
874
+ exports.CopilotChat = CopilotChat;
875
+ //# sourceMappingURL=out.js.map
876
+ //# sourceMappingURL=copilot-chat.js.map