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