@copilotkit/react-ui 1.5.0-tyler-reset-chat.0 → 1.5.1-custom-tag-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +203 -5
  2. package/dist/{chunk-Z2RXDT7O.mjs → chunk-375NVWZM.mjs} +2 -2
  3. package/dist/{chunk-OMTPWC7T.mjs → chunk-3E7HY2UN.mjs} +5 -4
  4. package/dist/chunk-3E7HY2UN.mjs.map +1 -0
  5. package/dist/{chunk-RKPANT3F.mjs → chunk-7II4YL7R.mjs} +2 -6
  6. package/dist/chunk-7II4YL7R.mjs.map +1 -0
  7. package/dist/{chunk-4T3TMQNJ.mjs → chunk-BH6PCAAL.mjs} +38 -2
  8. package/dist/chunk-BH6PCAAL.mjs.map +1 -0
  9. package/dist/{chunk-OI5EKZPO.mjs → chunk-DCNCY2PL.mjs} +13 -6
  10. package/dist/{chunk-OI5EKZPO.mjs.map → chunk-DCNCY2PL.mjs.map} +1 -1
  11. package/dist/{chunk-4LUMV4YO.mjs → chunk-EMQEEXUB.mjs} +8 -3
  12. package/dist/chunk-EMQEEXUB.mjs.map +1 -0
  13. package/dist/{chunk-2B57NCBA.mjs → chunk-F2W5FD7L.mjs} +3 -3
  14. package/dist/{chunk-4FIGRRFS.mjs → chunk-PNQVKBPN.mjs} +2 -2
  15. package/dist/{chunk-4FIGRRFS.mjs.map → chunk-PNQVKBPN.mjs.map} +1 -1
  16. package/dist/chunk-TI7SY2RI.mjs +164 -0
  17. package/dist/chunk-TI7SY2RI.mjs.map +1 -0
  18. package/dist/{chunk-B6A6OMIG.mjs → chunk-UWVGLGFQ.mjs} +4 -4
  19. package/dist/{chunk-RQRK6DEW.mjs → chunk-WSMMTZCM.mjs} +2 -2
  20. package/dist/components/chat/Chat.js +149 -36
  21. package/dist/components/chat/Chat.js.map +1 -1
  22. package/dist/components/chat/Chat.mjs +8 -8
  23. package/dist/components/chat/Input.js +7 -2
  24. package/dist/components/chat/Input.js.map +1 -1
  25. package/dist/components/chat/Input.mjs +1 -1
  26. package/dist/components/chat/Messages.d.ts +3 -3
  27. package/dist/components/chat/Messages.js.map +1 -1
  28. package/dist/components/chat/Messages.mjs +1 -1
  29. package/dist/components/chat/Modal.js +149 -36
  30. package/dist/components/chat/Modal.js.map +1 -1
  31. package/dist/components/chat/Modal.mjs +9 -9
  32. package/dist/components/chat/Popup.js +149 -36
  33. package/dist/components/chat/Popup.js.map +1 -1
  34. package/dist/components/chat/Popup.mjs +10 -10
  35. package/dist/components/chat/Sidebar.js +149 -36
  36. package/dist/components/chat/Sidebar.js.map +1 -1
  37. package/dist/components/chat/Sidebar.mjs +10 -10
  38. package/dist/components/chat/index.js +149 -36
  39. package/dist/components/chat/index.js.map +1 -1
  40. package/dist/components/chat/index.mjs +11 -11
  41. package/dist/components/chat/messages/RenderActionExecutionMessage.js +4 -3
  42. package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
  43. package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +1 -1
  44. package/dist/components/dev-console/console.js +128 -28
  45. package/dist/components/dev-console/console.js.map +1 -1
  46. package/dist/components/dev-console/console.mjs +4 -4
  47. package/dist/components/dev-console/index.js +128 -28
  48. package/dist/components/dev-console/index.js.map +1 -1
  49. package/dist/components/dev-console/index.mjs +4 -4
  50. package/dist/components/dev-console/utils.js +1 -1
  51. package/dist/components/dev-console/utils.js.map +1 -1
  52. package/dist/components/dev-console/utils.mjs +1 -1
  53. package/dist/components/help-modal/icons.d.ts +4 -1
  54. package/dist/components/help-modal/icons.js +39 -2
  55. package/dist/components/help-modal/icons.js.map +1 -1
  56. package/dist/components/help-modal/icons.mjs +5 -3
  57. package/dist/components/help-modal/index.js +147 -27
  58. package/dist/components/help-modal/index.js.map +1 -1
  59. package/dist/components/help-modal/index.mjs +2 -2
  60. package/dist/components/help-modal/modal.js +147 -27
  61. package/dist/components/help-modal/modal.js.map +1 -1
  62. package/dist/components/help-modal/modal.mjs +2 -2
  63. package/dist/components/index.js +149 -36
  64. package/dist/components/index.js.map +1 -1
  65. package/dist/components/index.mjs +11 -11
  66. package/dist/index.js +149 -36
  67. package/dist/index.js.map +1 -1
  68. package/dist/index.mjs +11 -11
  69. package/package.json +7 -7
  70. package/src/components/chat/Chat.tsx +9 -2
  71. package/src/components/chat/Input.tsx +9 -2
  72. package/src/components/chat/Messages.tsx +2 -9
  73. package/src/components/chat/messages/RenderActionExecutionMessage.tsx +10 -3
  74. package/src/components/dev-console/utils.ts +1 -1
  75. package/src/components/help-modal/icons.tsx +28 -0
  76. package/src/components/help-modal/modal.tsx +102 -29
  77. package/dist/chunk-4LUMV4YO.mjs.map +0 -1
  78. package/dist/chunk-4T3TMQNJ.mjs.map +0 -1
  79. package/dist/chunk-OMTPWC7T.mjs.map +0 -1
  80. package/dist/chunk-RKPANT3F.mjs.map +0 -1
  81. package/dist/chunk-WOUWNTAV.mjs +0 -72
  82. package/dist/chunk-WOUWNTAV.mjs.map +0 -1
  83. /package/dist/{chunk-Z2RXDT7O.mjs.map → chunk-375NVWZM.mjs.map} +0 -0
  84. /package/dist/{chunk-2B57NCBA.mjs.map → chunk-F2W5FD7L.mjs.map} +0 -0
  85. /package/dist/{chunk-B6A6OMIG.mjs.map → chunk-UWVGLGFQ.mjs.map} +0 -0
  86. /package/dist/{chunk-RQRK6DEW.mjs.map → chunk-WSMMTZCM.mjs.map} +0 -0
@@ -16,6 +16,26 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
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
+ };
19
39
 
20
40
  // src/components/help-modal/index.tsx
21
41
  var help_modal_exports = {};
@@ -29,41 +49,52 @@ var import_react = require("react");
29
49
 
30
50
  // src/components/help-modal/icons.tsx
31
51
  var import_jsx_runtime = require("react/jsx-runtime");
32
- var LifeBuoyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
33
53
  "svg",
34
54
  {
35
55
  xmlns: "http://www.w3.org/2000/svg",
36
- width: "24",
37
- height: "24",
38
- viewBox: "0 0 24 24",
39
56
  fill: "none",
57
+ viewBox: "0 0 24 24",
58
+ strokeWidth: "1.5",
40
59
  stroke: "currentColor",
41
- strokeWidth: "2",
42
- strokeLinecap: "round",
43
- strokeLinejoin: "round",
44
- className: "icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy",
45
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(0, -1)", children: [
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
49
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 15l3.35 3.35" }),
50
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 15l-3.35 3.35" }),
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.65 5.65l3.35 3.35" }),
52
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18.35 5.65l-3.35 3.35" })
53
- ] })
60
+ width: "20",
61
+ height: "20",
62
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
54
63
  }
55
64
  );
56
- var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ var LoadingSpinnerIcon = ({ color = "rgb(107 114 128)" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
57
66
  "svg",
58
67
  {
68
+ style: {
69
+ animation: "copilotKitSpinAnimation 1s linear infinite",
70
+ color
71
+ },
72
+ width: "24",
73
+ height: "24",
59
74
  xmlns: "http://www.w3.org/2000/svg",
60
75
  fill: "none",
61
76
  viewBox: "0 0 24 24",
62
- strokeWidth: "1.5",
63
- stroke: "currentColor",
64
- width: "20",
65
- height: "20",
66
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
77
+ children: [
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
+ "circle",
80
+ {
81
+ style: { opacity: 0.25 },
82
+ cx: "12",
83
+ cy: "12",
84
+ r: "10",
85
+ stroke: "currentColor",
86
+ strokeWidth: "4"
87
+ }
88
+ ),
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ "path",
91
+ {
92
+ style: { opacity: 0.75 },
93
+ fill: "currentColor",
94
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
95
+ }
96
+ )
97
+ ]
67
98
  }
68
99
  );
69
100
 
@@ -72,18 +103,52 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
72
103
  function CopilotKitHelpModal() {
73
104
  const [showHelpModal, setShowHelpModal] = (0, import_react.useState)(false);
74
105
  const [issueDescription, setIssueDescription] = (0, import_react.useState)("");
75
- const handleSubmit = () => {
76
- setShowHelpModal(false);
106
+ const [email, setEmail] = (0, import_react.useState)("");
107
+ const [emailError, setEmailError] = (0, import_react.useState)("");
108
+ const [submitting, setSubmitting] = (0, import_react.useState)(false);
109
+ const validateEmail = (email2) => {
110
+ const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
111
+ return re.test(email2);
77
112
  };
113
+ const handleSubmit = (e) => __async(this, null, function* () {
114
+ e.preventDefault();
115
+ if ((email == null ? void 0 : email.length) > 0 && !validateEmail(email)) {
116
+ setEmailError("Please enter a valid email address");
117
+ return;
118
+ }
119
+ setSubmitting(true);
120
+ yield fetch("https://api.segment.io/v1/track", {
121
+ method: "POST",
122
+ headers: {
123
+ "Content-Type": "application/json"
124
+ },
125
+ body: JSON.stringify({
126
+ event: "oss.dev-console.help",
127
+ anonymousId: window.crypto.randomUUID(),
128
+ properties: { email, text: issueDescription },
129
+ writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW"
130
+ })
131
+ });
132
+ setEmailError("");
133
+ setEmail("");
134
+ setIssueDescription("");
135
+ setSubmitting(false);
136
+ setShowHelpModal(false);
137
+ });
78
138
  const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
79
139
  "button",
80
140
  {
81
141
  onClick: () => setShowHelpModal(true),
82
- className: "p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500",
142
+ style: { width: "50px", height: "30px", marginRight: "0.25rem" },
143
+ className: "text-sm p-0 bg-transparent rounded border border-blue-500",
83
144
  "aria-label": "Open Help",
84
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LifeBuoyIcon, {})
145
+ children: "Help"
85
146
  }
86
147
  );
148
+ const submitButtonDisabled = (0, import_react.useMemo)(
149
+ () => submitting || !!emailError || issueDescription == null || (issueDescription == null ? void 0 : issueDescription.length) == 0,
150
+ [submitting, emailError, issueDescription]
151
+ );
87
152
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
88
153
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HelpButton, {}),
89
154
  showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -104,6 +169,15 @@ function CopilotKitHelpModal() {
104
169
  ),
105
170
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
106
171
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-4 mb-4", children: [
172
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
173
+ "a",
174
+ {
175
+ href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
176
+ target: "_blank",
177
+ rel: "noopener noreferrer",
178
+ children: "Visit the Troubleshooting and FAQ section in the docs"
179
+ }
180
+ ) }),
107
181
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
108
182
  "a",
109
183
  {
@@ -122,6 +196,52 @@ function CopilotKitHelpModal() {
122
196
  children: "Apply for Priority Direct Slack Support"
123
197
  }
124
198
  ) })
199
+ ] }),
200
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("form", { onSubmit: handleSubmit, className: "flex flex-col space-y-2", children: [
201
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "feedback", className: "block text-sm font-medium text-gray-700 mb-1", children: "Let us know what your issue is:" }),
203
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
204
+ "textarea",
205
+ {
206
+ id: "feedback",
207
+ rows: 4,
208
+ className: "w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500",
209
+ placeholder: "A Loom link / screen recording is always great!",
210
+ onChange: (e) => setIssueDescription(e.target.value),
211
+ value: issueDescription,
212
+ required: true
213
+ }
214
+ )
215
+ ] }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
217
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700 mb-1", children: "Email (optional):" }),
218
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
219
+ "input",
220
+ {
221
+ type: "email",
222
+ id: "email",
223
+ className: `w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`,
224
+ placeholder: "Enter your email for follow-up",
225
+ onChange: (e) => {
226
+ setEmail(e.target.value);
227
+ setEmailError("");
228
+ },
229
+ value: email
230
+ }
231
+ ),
232
+ emailError && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-red-500 text-sm mt-1", children: emailError })
233
+ ] }),
234
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
235
+ "button",
236
+ {
237
+ type: "submit",
238
+ onClick: handleSubmit,
239
+ disabled: submitButtonDisabled,
240
+ style: submitButtonDisabled ? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" } : void 0,
241
+ className: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none",
242
+ children: submitting ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinnerIcon, { color: "white" }) : "Submit"
243
+ }
244
+ ) })
125
245
  ] })
126
246
  ] })
127
247
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/help-modal/index.tsx","../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["export { CopilotKitHelpModal } from \"./modal\";\n","import React, { useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n\n const handleSubmit = () => {\n // submit issueDescription\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n className=\"p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n aria-label=\"Open Help\"\n >\n <LifeBuoyIcon />\n </button>\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n {/*<form onSubmit={handleSubmit} className=\"flex flex-col space-y-4\">*/}\n {/* <div>*/}\n {/* <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">*/}\n {/* Let us know what your issue is:*/}\n {/* </label>*/}\n {/* <textarea*/}\n {/* id=\"feedback\"*/}\n {/* rows={4}*/}\n {/* className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"*/}\n {/* placeholder=\"A Loom link / screen recording is always great!\"*/}\n {/* onChange={e => setIssueDescription(e.target.value)}*/}\n {/* value={issueDescription}*/}\n {/* ></textarea>*/}\n {/* </div>*/}\n {/* <div className=\"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">*/}\n {/* <button*/}\n {/* type=\"submit\"*/}\n {/* className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm\"*/}\n {/* >*/}\n {/* Submit*/}\n {/* </button>*/}\n {/* </div>*/}\n {/*</form>*/}\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgC;;;ACe5B;AAbG,IAAM,eAAe,MAC1B;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,WAAU;AAAA,IAEV,uDAAC,OAAE,WAAU,oBACX;AAAA,kDAAC,UAAK,QAAO,QAAO,GAAE,iBAAgB,MAAK,QAAO;AAAA,MAClD,4CAAC,UAAK,GAAE,4CAA2C;AAAA,MACnD,4CAAC,UAAK,GAAE,8CAA6C;AAAA,MACrD,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,wBAAuB;AAAA,MAC/B,4CAAC,UAAK,GAAE,0BAAy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AAAA;AAAA,YAED,GACF;AAAA,YACA,6CAAC,SAAI,WAAU,uHACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,KAAI;AAAA,gBACL;AAAA;AAAA,YAED,GACF;AAAA,aACF;AAAA,WAwBF;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":["import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/help-modal/index.tsx","../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["export { CopilotKitHelpModal } from \"./modal\";\n","import React, { useMemo, useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon, LoadingSpinnerIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n const [email, setEmail] = useState(\"\");\n const [emailError, setEmailError] = useState(\"\");\n const [submitting, setSubmitting] = useState(false);\n\n const validateEmail = (email: string) => {\n const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n return re.test(email);\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (email?.length > 0 && !validateEmail(email)) {\n setEmailError(\"Please enter a valid email address\");\n return;\n }\n setSubmitting(true);\n\n await fetch(\"https://api.segment.io/v1/track\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n event: \"oss.dev-console.help\",\n anonymousId: window.crypto.randomUUID(),\n properties: { email, text: issueDescription },\n writeKey: \"q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW\",\n }),\n });\n\n // Reset\n setEmailError(\"\");\n setEmail(\"\");\n setIssueDescription(\"\");\n setSubmitting(false);\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n style={{ width: \"50px\", height: \"30px\", marginRight: \"0.25rem\" }}\n className=\"text-sm p-0 bg-transparent rounded border border-blue-500\"\n aria-label=\"Open Help\"\n >\n Help\n </button>\n );\n\n const submitButtonDisabled = useMemo(\n () => submitting || !!emailError || issueDescription == null || issueDescription?.length == 0,\n [submitting, emailError, issueDescription],\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://docs.copilotkit.ai/coagents/troubleshooting/common-issues\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Visit the Troubleshooting and FAQ section in the docs\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n <form onSubmit={handleSubmit} className=\"flex flex-col space-y-2\">\n <div>\n <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Let us know what your issue is:\n </label>\n <textarea\n id=\"feedback\"\n rows={4}\n className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"\n placeholder=\"A Loom link / screen recording is always great!\"\n onChange={(e) => setIssueDescription(e.target.value)}\n value={issueDescription}\n required\n ></textarea>\n </div>\n <div>\n <label htmlFor=\"email\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Email (optional):\n </label>\n <input\n type=\"email\"\n id=\"email\"\n className={`w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? \"border-red-500\" : \"\"}`}\n placeholder=\"Enter your email for follow-up\"\n onChange={(e) => {\n setEmail(e.target.value);\n setEmailError(\"\");\n }}\n value={email}\n />\n {emailError && <p className=\"text-red-500 text-sm mt-1\">{emailError}</p>}\n </div>\n <div className=\"bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">\n <button\n type=\"submit\"\n onClick={handleSubmit}\n disabled={submitButtonDisabled}\n style={\n submitButtonDisabled\n ? { backgroundColor: \"rgb(216, 216, 216)\", color: \"rgb(129, 129, 129)\" }\n : undefined\n }\n className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none\"\n >\n {submitting ? <LoadingSpinnerIcon color=\"white\" /> : \"Submit\"}\n </button>\n </div>\n </form>\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n\nexport const LoadingSpinnerIcon = ({ color = \"rgb(107 114 128)\" }: { color?: string }) => (\n <svg\n style={{\n animation: \"copilotKitSpinAnimation 1s linear infinite\",\n color,\n }}\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style={{ opacity: 0.25 }}\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n ></circle>\n <path\n style={{ opacity: 0.75 }}\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAyC;;;ACerC;AAYG,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,O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yEACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,OACE,uBACI,EAAE,iBAAiB,sBAAsB,OAAO,qBAAqB,IACrE;AAAA,gBAEN,WAAU;AAAA,gBAET,uBAAa,6CAAC,sBAAmB,OAAM,SAAQ,IAAK;AAAA;AAAA,YACvD,GACF;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":["import_jsx_runtime","email"]}
@@ -1,8 +1,8 @@
1
1
  import "../../chunk-KXE2JCUH.mjs";
2
2
  import {
3
3
  CopilotKitHelpModal
4
- } from "../../chunk-WOUWNTAV.mjs";
5
- import "../../chunk-4T3TMQNJ.mjs";
4
+ } from "../../chunk-TI7SY2RI.mjs";
5
+ import "../../chunk-BH6PCAAL.mjs";
6
6
  import "../../chunk-MRXNTQOX.mjs";
7
7
  export {
8
8
  CopilotKitHelpModal
@@ -16,6 +16,26 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
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
+ };
19
39
 
20
40
  // src/components/help-modal/modal.tsx
21
41
  var modal_exports = {};
@@ -27,41 +47,52 @@ var import_react = require("react");
27
47
 
28
48
  // src/components/help-modal/icons.tsx
29
49
  var import_jsx_runtime = require("react/jsx-runtime");
30
- var LifeBuoyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31
51
  "svg",
32
52
  {
33
53
  xmlns: "http://www.w3.org/2000/svg",
34
- width: "24",
35
- height: "24",
36
- viewBox: "0 0 24 24",
37
54
  fill: "none",
55
+ viewBox: "0 0 24 24",
56
+ strokeWidth: "1.5",
38
57
  stroke: "currentColor",
39
- strokeWidth: "2",
40
- strokeLinecap: "round",
41
- strokeLinejoin: "round",
42
- className: "icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy",
43
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(0, -1)", children: [
44
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 15l3.35 3.35" }),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 15l-3.35 3.35" }),
49
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.65 5.65l3.35 3.35" }),
50
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18.35 5.65l-3.35 3.35" })
51
- ] })
58
+ width: "20",
59
+ height: "20",
60
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
52
61
  }
53
62
  );
54
- var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ var LoadingSpinnerIcon = ({ color = "rgb(107 114 128)" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
55
64
  "svg",
56
65
  {
66
+ style: {
67
+ animation: "copilotKitSpinAnimation 1s linear infinite",
68
+ color
69
+ },
70
+ width: "24",
71
+ height: "24",
57
72
  xmlns: "http://www.w3.org/2000/svg",
58
73
  fill: "none",
59
74
  viewBox: "0 0 24 24",
60
- strokeWidth: "1.5",
61
- stroke: "currentColor",
62
- width: "20",
63
- height: "20",
64
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
75
+ children: [
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ "circle",
78
+ {
79
+ style: { opacity: 0.25 },
80
+ cx: "12",
81
+ cy: "12",
82
+ r: "10",
83
+ stroke: "currentColor",
84
+ strokeWidth: "4"
85
+ }
86
+ ),
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ "path",
89
+ {
90
+ style: { opacity: 0.75 },
91
+ fill: "currentColor",
92
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
93
+ }
94
+ )
95
+ ]
65
96
  }
66
97
  );
67
98
 
@@ -70,18 +101,52 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
70
101
  function CopilotKitHelpModal() {
71
102
  const [showHelpModal, setShowHelpModal] = (0, import_react.useState)(false);
72
103
  const [issueDescription, setIssueDescription] = (0, import_react.useState)("");
73
- const handleSubmit = () => {
74
- setShowHelpModal(false);
104
+ const [email, setEmail] = (0, import_react.useState)("");
105
+ const [emailError, setEmailError] = (0, import_react.useState)("");
106
+ const [submitting, setSubmitting] = (0, import_react.useState)(false);
107
+ const validateEmail = (email2) => {
108
+ const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
109
+ return re.test(email2);
75
110
  };
111
+ const handleSubmit = (e) => __async(this, null, function* () {
112
+ e.preventDefault();
113
+ if ((email == null ? void 0 : email.length) > 0 && !validateEmail(email)) {
114
+ setEmailError("Please enter a valid email address");
115
+ return;
116
+ }
117
+ setSubmitting(true);
118
+ yield fetch("https://api.segment.io/v1/track", {
119
+ method: "POST",
120
+ headers: {
121
+ "Content-Type": "application/json"
122
+ },
123
+ body: JSON.stringify({
124
+ event: "oss.dev-console.help",
125
+ anonymousId: window.crypto.randomUUID(),
126
+ properties: { email, text: issueDescription },
127
+ writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW"
128
+ })
129
+ });
130
+ setEmailError("");
131
+ setEmail("");
132
+ setIssueDescription("");
133
+ setSubmitting(false);
134
+ setShowHelpModal(false);
135
+ });
76
136
  const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
77
137
  "button",
78
138
  {
79
139
  onClick: () => setShowHelpModal(true),
80
- className: "p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500",
140
+ style: { width: "50px", height: "30px", marginRight: "0.25rem" },
141
+ className: "text-sm p-0 bg-transparent rounded border border-blue-500",
81
142
  "aria-label": "Open Help",
82
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LifeBuoyIcon, {})
143
+ children: "Help"
83
144
  }
84
145
  );
146
+ const submitButtonDisabled = (0, import_react.useMemo)(
147
+ () => submitting || !!emailError || issueDescription == null || (issueDescription == null ? void 0 : issueDescription.length) == 0,
148
+ [submitting, emailError, issueDescription]
149
+ );
85
150
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
86
151
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HelpButton, {}),
87
152
  showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -102,6 +167,15 @@ function CopilotKitHelpModal() {
102
167
  ),
103
168
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
104
169
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-4 mb-4", children: [
170
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
171
+ "a",
172
+ {
173
+ href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
174
+ target: "_blank",
175
+ rel: "noopener noreferrer",
176
+ children: "Visit the Troubleshooting and FAQ section in the docs"
177
+ }
178
+ ) }),
105
179
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
106
180
  "a",
107
181
  {
@@ -120,6 +194,52 @@ function CopilotKitHelpModal() {
120
194
  children: "Apply for Priority Direct Slack Support"
121
195
  }
122
196
  ) })
197
+ ] }),
198
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("form", { onSubmit: handleSubmit, className: "flex flex-col space-y-2", children: [
199
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "feedback", className: "block text-sm font-medium text-gray-700 mb-1", children: "Let us know what your issue is:" }),
201
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
202
+ "textarea",
203
+ {
204
+ id: "feedback",
205
+ rows: 4,
206
+ className: "w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500",
207
+ placeholder: "A Loom link / screen recording is always great!",
208
+ onChange: (e) => setIssueDescription(e.target.value),
209
+ value: issueDescription,
210
+ required: true
211
+ }
212
+ )
213
+ ] }),
214
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
215
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700 mb-1", children: "Email (optional):" }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
217
+ "input",
218
+ {
219
+ type: "email",
220
+ id: "email",
221
+ className: `w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`,
222
+ placeholder: "Enter your email for follow-up",
223
+ onChange: (e) => {
224
+ setEmail(e.target.value);
225
+ setEmailError("");
226
+ },
227
+ value: email
228
+ }
229
+ ),
230
+ emailError && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-red-500 text-sm mt-1", children: emailError })
231
+ ] }),
232
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
233
+ "button",
234
+ {
235
+ type: "submit",
236
+ onClick: handleSubmit,
237
+ disabled: submitButtonDisabled,
238
+ style: submitButtonDisabled ? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" } : void 0,
239
+ className: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none",
240
+ children: submitting ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinnerIcon, { color: "white" }) : "Submit"
241
+ }
242
+ ) })
123
243
  ] })
124
244
  ] })
125
245
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n\n const handleSubmit = () => {\n // submit issueDescription\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n className=\"p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n aria-label=\"Open Help\"\n >\n <LifeBuoyIcon />\n </button>\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n {/*<form onSubmit={handleSubmit} className=\"flex flex-col space-y-4\">*/}\n {/* <div>*/}\n {/* <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">*/}\n {/* Let us know what your issue is:*/}\n {/* </label>*/}\n {/* <textarea*/}\n {/* id=\"feedback\"*/}\n {/* rows={4}*/}\n {/* className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"*/}\n {/* placeholder=\"A Loom link / screen recording is always great!\"*/}\n {/* onChange={e => setIssueDescription(e.target.value)}*/}\n {/* value={issueDescription}*/}\n {/* ></textarea>*/}\n {/* </div>*/}\n {/* <div className=\"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">*/}\n {/* <button*/}\n {/* type=\"submit\"*/}\n {/* className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm\"*/}\n {/* >*/}\n {/* Submit*/}\n {/* </button>*/}\n {/* </div>*/}\n {/*</form>*/}\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;;;ACe5B;AAbG,IAAM,eAAe,MAC1B;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,WAAU;AAAA,IAEV,uDAAC,OAAE,WAAU,oBACX;AAAA,kDAAC,UAAK,QAAO,QAAO,GAAE,iBAAgB,MAAK,QAAO;AAAA,MAClD,4CAAC,UAAK,GAAE,4CAA2C;AAAA,MACnD,4CAAC,UAAK,GAAE,8CAA6C;AAAA,MACrD,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,wBAAuB;AAAA,MAC/B,4CAAC,UAAK,GAAE,0BAAyB;AAAA,OACnC;AAAA;AACF;AAGK,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,aAAY;AAAA,IACZ,QAAO;AAAA,IACP,OAAM;AAAA,IACN,QAAO;AAAA,IAEP,sDAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAAA;AAC9E;;;ADpBI,IAAAA,sBAAA;AAfC,SAAS,sBAAsB;AACpC,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAS,KAAK;AACxD,QAAM,CAAC,kBAAkB,mBAAmB,QAAI,uBAAS,EAAE;AAE3D,QAAM,eAAe,MAAM;AAEzB,qBAAiB,KAAK;AAAA,EACxB;AAEA,QAAM,aAAa,MACjB;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM,iBAAiB,IAAI;AAAA,MACpC,WAAU;AAAA,MACV,cAAW;AAAA,MAEX,uDAAC,gBAAa;AAAA;AAAA,EAChB;AAGF,SACE,8EACE;AAAA,iDAAC,cAAW;AAAA,IACX,iBACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,iBAAiB,yBAAyB,QAAQ,GAAG;AAAA,QAE9D,wDAAC,SAAI,WAAU,uEACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,KAAK,QAAQ,OAAO,OAAO;AAAA,cACpC,SAAS,MAAM,iBAAiB,KAAK;AAAA,cACrC,cAAW;AAAA,cAEX,uDAAC,aAAU;AAAA;AAAA,UACb;AAAA,UACA,6CAAC,SAAI,WAAU,mCACb,uDAAC,QAAG,WAAU,sBAAqB,0BAAY,GACjD;AAAA,UACA,8CAAC,SAAI,WAAU,kBACb;AAAA,yDAAC,SAAI,WAAU,uHACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,KAAI;AAAA,gBACL;AAAA;AAAA,YAED,GACF;AAAA,YACA,6CAAC,SAAI,WAAU,uHACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,KAAI;AAAA,gBACL;AAAA;AAAA,YAED,GACF;AAAA,aACF;AAAA,WAwBF;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":["import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon, LoadingSpinnerIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n const [email, setEmail] = useState(\"\");\n const [emailError, setEmailError] = useState(\"\");\n const [submitting, setSubmitting] = useState(false);\n\n const validateEmail = (email: string) => {\n const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n return re.test(email);\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (email?.length > 0 && !validateEmail(email)) {\n setEmailError(\"Please enter a valid email address\");\n return;\n }\n setSubmitting(true);\n\n await fetch(\"https://api.segment.io/v1/track\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n event: \"oss.dev-console.help\",\n anonymousId: window.crypto.randomUUID(),\n properties: { email, text: issueDescription },\n writeKey: \"q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW\",\n }),\n });\n\n // Reset\n setEmailError(\"\");\n setEmail(\"\");\n setIssueDescription(\"\");\n setSubmitting(false);\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n style={{ width: \"50px\", height: \"30px\", marginRight: \"0.25rem\" }}\n className=\"text-sm p-0 bg-transparent rounded border border-blue-500\"\n aria-label=\"Open Help\"\n >\n Help\n </button>\n );\n\n const submitButtonDisabled = useMemo(\n () => submitting || !!emailError || issueDescription == null || issueDescription?.length == 0,\n [submitting, emailError, issueDescription],\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://docs.copilotkit.ai/coagents/troubleshooting/common-issues\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Visit the Troubleshooting and FAQ section in the docs\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n <form onSubmit={handleSubmit} className=\"flex flex-col space-y-2\">\n <div>\n <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Let us know what your issue is:\n </label>\n <textarea\n id=\"feedback\"\n rows={4}\n className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"\n placeholder=\"A Loom link / screen recording is always great!\"\n onChange={(e) => setIssueDescription(e.target.value)}\n value={issueDescription}\n required\n ></textarea>\n </div>\n <div>\n <label htmlFor=\"email\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Email (optional):\n </label>\n <input\n type=\"email\"\n id=\"email\"\n className={`w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? \"border-red-500\" : \"\"}`}\n placeholder=\"Enter your email for follow-up\"\n onChange={(e) => {\n setEmail(e.target.value);\n setEmailError(\"\");\n }}\n value={email}\n />\n {emailError && <p className=\"text-red-500 text-sm mt-1\">{emailError}</p>}\n </div>\n <div className=\"bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">\n <button\n type=\"submit\"\n onClick={handleSubmit}\n disabled={submitButtonDisabled}\n style={\n submitButtonDisabled\n ? { backgroundColor: \"rgb(216, 216, 216)\", color: \"rgb(129, 129, 129)\" }\n : undefined\n }\n className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none\"\n >\n {submitting ? <LoadingSpinnerIcon color=\"white\" /> : \"Submit\"}\n </button>\n </div>\n </form>\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n\nexport const LoadingSpinnerIcon = ({ color = \"rgb(107 114 128)\" }: { color?: string }) => (\n <svg\n style={{\n animation: \"copilotKitSpinAnimation 1s linear infinite\",\n color,\n }}\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style={{ opacity: 0.25 }}\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n ></circle>\n <path\n style={{ opacity: 0.75 }}\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyC;;;ACerC;AAYG,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,aAAY;AAAA,IACZ,QAAO;AAAA,IACP,OAAM;AAAA,IACN,QAAO;AAAA,IAEP,sDAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAAA;AAC9E;AAGK,IAAM,qBAAqB,CAAC,EAAE,QAAQ,mBAAmB,MAC9D;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,MACL,WAAW;AAAA,MACX;AAAA,IACF;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IA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chunk-4T3TMQNJ.mjs";
3
+ } from "../../chunk-TI7SY2RI.mjs";
4
+ import "../../chunk-BH6PCAAL.mjs";
5
5
  import "../../chunk-MRXNTQOX.mjs";
6
6
  export {
7
7
  CopilotKitHelpModal