@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.
- package/CHANGELOG.md +203 -5
- package/dist/{chunk-Z2RXDT7O.mjs → chunk-375NVWZM.mjs} +2 -2
- package/dist/{chunk-OMTPWC7T.mjs → chunk-3E7HY2UN.mjs} +5 -4
- package/dist/chunk-3E7HY2UN.mjs.map +1 -0
- package/dist/{chunk-RKPANT3F.mjs → chunk-7II4YL7R.mjs} +2 -6
- package/dist/chunk-7II4YL7R.mjs.map +1 -0
- package/dist/{chunk-4T3TMQNJ.mjs → chunk-BH6PCAAL.mjs} +38 -2
- package/dist/chunk-BH6PCAAL.mjs.map +1 -0
- package/dist/{chunk-OI5EKZPO.mjs → chunk-DCNCY2PL.mjs} +13 -6
- package/dist/{chunk-OI5EKZPO.mjs.map → chunk-DCNCY2PL.mjs.map} +1 -1
- package/dist/{chunk-4LUMV4YO.mjs → chunk-EMQEEXUB.mjs} +8 -3
- package/dist/chunk-EMQEEXUB.mjs.map +1 -0
- package/dist/{chunk-2B57NCBA.mjs → chunk-F2W5FD7L.mjs} +3 -3
- package/dist/{chunk-4FIGRRFS.mjs → chunk-PNQVKBPN.mjs} +2 -2
- package/dist/{chunk-4FIGRRFS.mjs.map → chunk-PNQVKBPN.mjs.map} +1 -1
- package/dist/chunk-TI7SY2RI.mjs +164 -0
- package/dist/chunk-TI7SY2RI.mjs.map +1 -0
- package/dist/{chunk-B6A6OMIG.mjs → chunk-UWVGLGFQ.mjs} +4 -4
- package/dist/{chunk-RQRK6DEW.mjs → chunk-WSMMTZCM.mjs} +2 -2
- package/dist/components/chat/Chat.js +149 -36
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +8 -8
- package/dist/components/chat/Input.js +7 -2
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Messages.d.ts +3 -3
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +1 -1
- package/dist/components/chat/Modal.js +149 -36
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +9 -9
- package/dist/components/chat/Popup.js +149 -36
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +10 -10
- package/dist/components/chat/Sidebar.js +149 -36
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +10 -10
- package/dist/components/chat/index.js +149 -36
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +11 -11
- package/dist/components/chat/messages/RenderActionExecutionMessage.js +4 -3
- package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +1 -1
- package/dist/components/dev-console/console.js +128 -28
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +4 -4
- package/dist/components/dev-console/index.js +128 -28
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +4 -4
- package/dist/components/dev-console/utils.js +1 -1
- package/dist/components/dev-console/utils.js.map +1 -1
- package/dist/components/dev-console/utils.mjs +1 -1
- package/dist/components/help-modal/icons.d.ts +4 -1
- package/dist/components/help-modal/icons.js +39 -2
- package/dist/components/help-modal/icons.js.map +1 -1
- package/dist/components/help-modal/icons.mjs +5 -3
- package/dist/components/help-modal/index.js +147 -27
- package/dist/components/help-modal/index.js.map +1 -1
- package/dist/components/help-modal/index.mjs +2 -2
- package/dist/components/help-modal/modal.js +147 -27
- package/dist/components/help-modal/modal.js.map +1 -1
- package/dist/components/help-modal/modal.mjs +2 -2
- package/dist/components/index.js +149 -36
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -11
- package/dist/index.js +149 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/package.json +7 -7
- package/src/components/chat/Chat.tsx +9 -2
- package/src/components/chat/Input.tsx +9 -2
- package/src/components/chat/Messages.tsx +2 -9
- package/src/components/chat/messages/RenderActionExecutionMessage.tsx +10 -3
- package/src/components/dev-console/utils.ts +1 -1
- package/src/components/help-modal/icons.tsx +28 -0
- package/src/components/help-modal/modal.tsx +102 -29
- package/dist/chunk-4LUMV4YO.mjs.map +0 -1
- package/dist/chunk-4T3TMQNJ.mjs.map +0 -1
- package/dist/chunk-OMTPWC7T.mjs.map +0 -1
- package/dist/chunk-RKPANT3F.mjs.map +0 -1
- package/dist/chunk-WOUWNTAV.mjs +0 -72
- package/dist/chunk-WOUWNTAV.mjs.map +0 -1
- /package/dist/{chunk-Z2RXDT7O.mjs.map → chunk-375NVWZM.mjs.map} +0 -0
- /package/dist/{chunk-2B57NCBA.mjs.map → chunk-F2W5FD7L.mjs.map} +0 -0
- /package/dist/{chunk-B6A6OMIG.mjs.map → chunk-UWVGLGFQ.mjs.map} +0 -0
- /package/dist/{chunk-RQRK6DEW.mjs.map → chunk-WSMMTZCM.mjs.map} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotSidebar
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-WSMMTZCM.mjs";
|
|
4
|
+
import "../../chunk-UWVGLGFQ.mjs";
|
|
5
5
|
import "../../chunk-YAGE7RCE.mjs";
|
|
6
6
|
import "../../chunk-VEC45H6Q.mjs";
|
|
7
7
|
import "../../chunk-RQNJNK2W.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-DCNCY2PL.mjs";
|
|
9
9
|
import "../../chunk-6INMITFA.mjs";
|
|
10
10
|
import "../../chunk-RU73BEZM.mjs";
|
|
11
11
|
import "../../chunk-V7W6IM2V.mjs";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-3E7HY2UN.mjs";
|
|
13
13
|
import "../../chunk-ZABXREBH.mjs";
|
|
14
14
|
import "../../chunk-RJCZRKTV.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-F2W5FD7L.mjs";
|
|
16
|
+
import "../../chunk-PNQVKBPN.mjs";
|
|
17
17
|
import "../../chunk-KXE2JCUH.mjs";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-TI7SY2RI.mjs";
|
|
19
|
+
import "../../chunk-BH6PCAAL.mjs";
|
|
20
20
|
import "../../chunk-OTPAZXVR.mjs";
|
|
21
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-EMQEEXUB.mjs";
|
|
22
22
|
import "../../chunk-YQFVRDNC.mjs";
|
|
23
23
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
24
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-7II4YL7R.mjs";
|
|
25
25
|
import "../../chunk-3XAXY2Z3.mjs";
|
|
26
26
|
import "../../chunk-CBBFRI3Q.mjs";
|
|
27
27
|
import "../../chunk-UPTB2MVO.mjs";
|
|
@@ -880,7 +880,10 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
|
|
|
880
880
|
});
|
|
881
881
|
const sendIcon = inProgress || pushToTalkState === "transcribing" ? context.icons.activityIcon : context.icons.sendIcon;
|
|
882
882
|
const showPushToTalk = pushToTalkConfigured && (pushToTalkState === "idle" || pushToTalkState === "recording") && !inProgress;
|
|
883
|
-
const
|
|
883
|
+
const canSend = () => {
|
|
884
|
+
return !inProgress && text.trim().length > 0 && pushToTalkState === "idle";
|
|
885
|
+
};
|
|
886
|
+
const sendDisabled = !canSend();
|
|
884
887
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "copilotKitInput", onClick: handleDivClick, children: [
|
|
885
888
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
886
889
|
Textarea_default,
|
|
@@ -894,7 +897,9 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
|
|
|
894
897
|
onKeyDown: (event) => {
|
|
895
898
|
if (event.key === "Enter" && !event.shiftKey) {
|
|
896
899
|
event.preventDefault();
|
|
897
|
-
|
|
900
|
+
if (canSend()) {
|
|
901
|
+
send();
|
|
902
|
+
}
|
|
898
903
|
}
|
|
899
904
|
}
|
|
900
905
|
}
|
|
@@ -941,9 +946,9 @@ var import_react7 = require("react");
|
|
|
941
946
|
var import_react_syntax_highlighter = require("react-syntax-highlighter");
|
|
942
947
|
|
|
943
948
|
// src/hooks/use-copy-to-clipboard.tsx
|
|
944
|
-
var
|
|
949
|
+
var React5 = __toESM(require("react"));
|
|
945
950
|
function useCopyToClipboard({ timeout = 2e3 }) {
|
|
946
|
-
const [isCopied, setIsCopied] =
|
|
951
|
+
const [isCopied, setIsCopied] = React5.useState(false);
|
|
947
952
|
const copyToClipboard = (value) => {
|
|
948
953
|
var _a;
|
|
949
954
|
if (typeof window === "undefined" || !((_a = navigator.clipboard) == null ? void 0 : _a.writeText)) {
|
|
@@ -1439,8 +1444,8 @@ function RenderActionExecutionMessage(props) {
|
|
|
1439
1444
|
const { chatComponentsCache } = (0, import_react_core3.useCopilotContext)();
|
|
1440
1445
|
const { icons } = useChatContext();
|
|
1441
1446
|
if (message.isActionExecutionMessage()) {
|
|
1442
|
-
if (chatComponentsCache.current !== null && chatComponentsCache.current.actions[message.name]) {
|
|
1443
|
-
const render = chatComponentsCache.current.actions[message.name];
|
|
1447
|
+
if (chatComponentsCache.current !== null && (chatComponentsCache.current.actions[message.name] || chatComponentsCache.current.actions["*"])) {
|
|
1448
|
+
const render = chatComponentsCache.current.actions[message.name] || chatComponentsCache.current.actions["*"];
|
|
1444
1449
|
if (typeof render === "string") {
|
|
1445
1450
|
if (isCurrentMessage && inProgress) {
|
|
1446
1451
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
@@ -1463,7 +1468,8 @@ function RenderActionExecutionMessage(props) {
|
|
|
1463
1468
|
const toRender = render({
|
|
1464
1469
|
status,
|
|
1465
1470
|
args,
|
|
1466
|
-
result: actionResult
|
|
1471
|
+
result: actionResult,
|
|
1472
|
+
name: message.name
|
|
1467
1473
|
});
|
|
1468
1474
|
if (!toRender && status === "complete") {
|
|
1469
1475
|
return null;
|
|
@@ -1777,7 +1783,7 @@ function logMessages(context) {
|
|
|
1777
1783
|
type: "ActionExecutionMessage",
|
|
1778
1784
|
role: void 0,
|
|
1779
1785
|
name: message.name,
|
|
1780
|
-
scope: message.
|
|
1786
|
+
scope: message.parentMessageId,
|
|
1781
1787
|
content: message.arguments
|
|
1782
1788
|
};
|
|
1783
1789
|
} else if (message.isResultMessage()) {
|
|
@@ -1900,41 +1906,52 @@ var import_react9 = require("react");
|
|
|
1900
1906
|
|
|
1901
1907
|
// src/components/help-modal/icons.tsx
|
|
1902
1908
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1903
|
-
var
|
|
1909
|
+
var CloseIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1904
1910
|
"svg",
|
|
1905
1911
|
{
|
|
1906
1912
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1907
|
-
width: "24",
|
|
1908
|
-
height: "24",
|
|
1909
|
-
viewBox: "0 0 24 24",
|
|
1910
1913
|
fill: "none",
|
|
1914
|
+
viewBox: "0 0 24 24",
|
|
1915
|
+
strokeWidth: "1.5",
|
|
1911
1916
|
stroke: "currentColor",
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
strokeLinejoin: "round",
|
|
1915
|
-
className: "icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy",
|
|
1916
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("g", { transform: "translate(0, -1)", children: [
|
|
1917
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1918
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
|
|
1919
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
|
|
1920
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M15 15l3.35 3.35" }),
|
|
1921
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M9 15l-3.35 3.35" }),
|
|
1922
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M5.65 5.65l3.35 3.35" }),
|
|
1923
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M18.35 5.65l-3.35 3.35" })
|
|
1924
|
-
] })
|
|
1917
|
+
width: "20",
|
|
1918
|
+
height: "20",
|
|
1919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
1925
1920
|
}
|
|
1926
1921
|
);
|
|
1927
|
-
var
|
|
1922
|
+
var LoadingSpinnerIcon = ({ color = "rgb(107 114 128)" }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1928
1923
|
"svg",
|
|
1929
1924
|
{
|
|
1925
|
+
style: {
|
|
1926
|
+
animation: "copilotKitSpinAnimation 1s linear infinite",
|
|
1927
|
+
color
|
|
1928
|
+
},
|
|
1929
|
+
width: "24",
|
|
1930
|
+
height: "24",
|
|
1930
1931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1931
1932
|
fill: "none",
|
|
1932
1933
|
viewBox: "0 0 24 24",
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1934
|
+
children: [
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1936
|
+
"circle",
|
|
1937
|
+
{
|
|
1938
|
+
style: { opacity: 0.25 },
|
|
1939
|
+
cx: "12",
|
|
1940
|
+
cy: "12",
|
|
1941
|
+
r: "10",
|
|
1942
|
+
stroke: "currentColor",
|
|
1943
|
+
strokeWidth: "4"
|
|
1944
|
+
}
|
|
1945
|
+
),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1947
|
+
"path",
|
|
1948
|
+
{
|
|
1949
|
+
style: { opacity: 0.75 },
|
|
1950
|
+
fill: "currentColor",
|
|
1951
|
+
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"
|
|
1952
|
+
}
|
|
1953
|
+
)
|
|
1954
|
+
]
|
|
1938
1955
|
}
|
|
1939
1956
|
);
|
|
1940
1957
|
|
|
@@ -1943,18 +1960,52 @@ var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
|
1943
1960
|
function CopilotKitHelpModal() {
|
|
1944
1961
|
const [showHelpModal, setShowHelpModal] = (0, import_react9.useState)(false);
|
|
1945
1962
|
const [issueDescription, setIssueDescription] = (0, import_react9.useState)("");
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1963
|
+
const [email, setEmail] = (0, import_react9.useState)("");
|
|
1964
|
+
const [emailError, setEmailError] = (0, import_react9.useState)("");
|
|
1965
|
+
const [submitting, setSubmitting] = (0, import_react9.useState)(false);
|
|
1966
|
+
const validateEmail = (email2) => {
|
|
1967
|
+
const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
1968
|
+
return re.test(email2);
|
|
1948
1969
|
};
|
|
1970
|
+
const handleSubmit = (e) => __async(this, null, function* () {
|
|
1971
|
+
e.preventDefault();
|
|
1972
|
+
if ((email == null ? void 0 : email.length) > 0 && !validateEmail(email)) {
|
|
1973
|
+
setEmailError("Please enter a valid email address");
|
|
1974
|
+
return;
|
|
1975
|
+
}
|
|
1976
|
+
setSubmitting(true);
|
|
1977
|
+
yield fetch("https://api.segment.io/v1/track", {
|
|
1978
|
+
method: "POST",
|
|
1979
|
+
headers: {
|
|
1980
|
+
"Content-Type": "application/json"
|
|
1981
|
+
},
|
|
1982
|
+
body: JSON.stringify({
|
|
1983
|
+
event: "oss.dev-console.help",
|
|
1984
|
+
anonymousId: window.crypto.randomUUID(),
|
|
1985
|
+
properties: { email, text: issueDescription },
|
|
1986
|
+
writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW"
|
|
1987
|
+
})
|
|
1988
|
+
});
|
|
1989
|
+
setEmailError("");
|
|
1990
|
+
setEmail("");
|
|
1991
|
+
setIssueDescription("");
|
|
1992
|
+
setSubmitting(false);
|
|
1993
|
+
setShowHelpModal(false);
|
|
1994
|
+
});
|
|
1949
1995
|
const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1950
1996
|
"button",
|
|
1951
1997
|
{
|
|
1952
1998
|
onClick: () => setShowHelpModal(true),
|
|
1953
|
-
|
|
1999
|
+
style: { width: "50px", height: "30px", marginRight: "0.25rem" },
|
|
2000
|
+
className: "text-sm p-0 bg-transparent rounded border border-blue-500",
|
|
1954
2001
|
"aria-label": "Open Help",
|
|
1955
|
-
children:
|
|
2002
|
+
children: "Help"
|
|
1956
2003
|
}
|
|
1957
2004
|
);
|
|
2005
|
+
const submitButtonDisabled = (0, import_react9.useMemo)(
|
|
2006
|
+
() => submitting || !!emailError || issueDescription == null || (issueDescription == null ? void 0 : issueDescription.length) == 0,
|
|
2007
|
+
[submitting, emailError, issueDescription]
|
|
2008
|
+
);
|
|
1958
2009
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1959
2010
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(HelpButton, {}),
|
|
1960
2011
|
showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -1975,6 +2026,15 @@ function CopilotKitHelpModal() {
|
|
|
1975
2026
|
),
|
|
1976
2027
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
|
|
1977
2028
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-4 mb-4", children: [
|
|
2029
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(
|
|
2030
|
+
"a",
|
|
2031
|
+
{
|
|
2032
|
+
href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
|
|
2033
|
+
target: "_blank",
|
|
2034
|
+
rel: "noopener noreferrer",
|
|
2035
|
+
children: "Visit the Troubleshooting and FAQ section in the docs"
|
|
2036
|
+
}
|
|
2037
|
+
) }),
|
|
1978
2038
|
/* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(
|
|
1979
2039
|
"a",
|
|
1980
2040
|
{
|
|
@@ -1993,6 +2053,52 @@ function CopilotKitHelpModal() {
|
|
|
1993
2053
|
children: "Apply for Priority Direct Slack Support"
|
|
1994
2054
|
}
|
|
1995
2055
|
) })
|
|
2056
|
+
] }),
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("form", { onSubmit: handleSubmit, className: "flex flex-col space-y-2", children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "feedback", className: "block text-sm font-medium text-gray-700 mb-1", children: "Let us know what your issue is:" }),
|
|
2060
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2061
|
+
"textarea",
|
|
2062
|
+
{
|
|
2063
|
+
id: "feedback",
|
|
2064
|
+
rows: 4,
|
|
2065
|
+
className: "w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500",
|
|
2066
|
+
placeholder: "A Loom link / screen recording is always great!",
|
|
2067
|
+
onChange: (e) => setIssueDescription(e.target.value),
|
|
2068
|
+
value: issueDescription,
|
|
2069
|
+
required: true
|
|
2070
|
+
}
|
|
2071
|
+
)
|
|
2072
|
+
] }),
|
|
2073
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
2074
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700 mb-1", children: "Email (optional):" }),
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2076
|
+
"input",
|
|
2077
|
+
{
|
|
2078
|
+
type: "email",
|
|
2079
|
+
id: "email",
|
|
2080
|
+
className: `w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`,
|
|
2081
|
+
placeholder: "Enter your email for follow-up",
|
|
2082
|
+
onChange: (e) => {
|
|
2083
|
+
setEmail(e.target.value);
|
|
2084
|
+
setEmailError("");
|
|
2085
|
+
},
|
|
2086
|
+
value: email
|
|
2087
|
+
}
|
|
2088
|
+
),
|
|
2089
|
+
emailError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-red-500 text-sm mt-1", children: emailError })
|
|
2090
|
+
] }),
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(
|
|
2092
|
+
"button",
|
|
2093
|
+
{
|
|
2094
|
+
type: "submit",
|
|
2095
|
+
onClick: handleSubmit,
|
|
2096
|
+
disabled: submitButtonDisabled,
|
|
2097
|
+
style: submitButtonDisabled ? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" } : void 0,
|
|
2098
|
+
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",
|
|
2099
|
+
children: submitting ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LoadingSpinnerIcon, { color: "white" }) : "Submit"
|
|
2100
|
+
}
|
|
2101
|
+
) })
|
|
1996
2102
|
] })
|
|
1997
2103
|
] })
|
|
1998
2104
|
}
|
|
@@ -2304,6 +2410,7 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
|
|
|
2304
2410
|
appendMessage,
|
|
2305
2411
|
reloadMessages: defaultReloadMessages,
|
|
2306
2412
|
stopGeneration: defaultStopGeneration,
|
|
2413
|
+
runChatCompletion,
|
|
2307
2414
|
isLoading
|
|
2308
2415
|
} = (0, import_react_core8.useCopilotChat)({
|
|
2309
2416
|
id: (0, import_shared3.randomId)(),
|
|
@@ -2386,7 +2493,13 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onS
|
|
|
2386
2493
|
});
|
|
2387
2494
|
const runCurrentAgent = (hint) => __async(void 0, null, function* () {
|
|
2388
2495
|
if (generalContext.agentSession) {
|
|
2389
|
-
yield (0, import_react_core9.runAgent)(
|
|
2496
|
+
yield (0, import_react_core9.runAgent)(
|
|
2497
|
+
generalContext.agentSession.agentName,
|
|
2498
|
+
context,
|
|
2499
|
+
appendMessage,
|
|
2500
|
+
runChatCompletion,
|
|
2501
|
+
hint
|
|
2502
|
+
);
|
|
2390
2503
|
}
|
|
2391
2504
|
});
|
|
2392
2505
|
const stopCurrentAgent = () => {
|