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