@copilotkit/react-ui 1.3.1 → 1.3.2-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 +10 -0
- package/dist/{chunk-FOZVHL73.mjs → chunk-4K36ATCD.mjs} +27 -14
- package/dist/chunk-4K36ATCD.mjs.map +1 -0
- package/dist/{chunk-HR36Y2FQ.mjs → chunk-I454U2HM.mjs} +2 -2
- package/dist/{chunk-QOEAEMUQ.mjs → chunk-KJQVEUVB.mjs} +2 -2
- package/dist/{chunk-FL4ETWFB.mjs → chunk-N6GQ4WV4.mjs} +2 -2
- package/dist/{chunk-B2KQEX2R.mjs → chunk-PGJGIYRW.mjs} +3 -3
- package/dist/components/chat/Chat.js +26 -13
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +2 -2
- package/dist/components/chat/Messages.js +26 -13
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +1 -1
- package/dist/components/chat/Modal.js +26 -13
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +3 -3
- package/dist/components/chat/Popup.js +26 -13
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +4 -4
- package/dist/components/chat/Sidebar.js +26 -13
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +4 -4
- package/dist/components/chat/index.js +26 -13
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +5 -5
- package/dist/components/index.js +26 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/index.js +26 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/package.json +7 -7
- package/src/components/chat/Messages.tsx +29 -19
- package/dist/chunk-FOZVHL73.mjs.map +0 -1
- /package/dist/{chunk-HR36Y2FQ.mjs.map → chunk-I454U2HM.mjs.map} +0 -0
- /package/dist/{chunk-QOEAEMUQ.mjs.map → chunk-KJQVEUVB.mjs.map} +0 -0
- /package/dist/{chunk-FL4ETWFB.mjs.map → chunk-N6GQ4WV4.mjs.map} +0 -0
- /package/dist/{chunk-B2KQEX2R.mjs.map → chunk-PGJGIYRW.mjs.map} +0 -0
|
@@ -2,18 +2,18 @@ import "../chunk-JD7BAH7U.mjs";
|
|
|
2
2
|
import "../chunk-MRFF7GSQ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KJQVEUVB.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-N6GQ4WV4.mjs";
|
|
10
|
+
import "../chunk-PGJGIYRW.mjs";
|
|
11
11
|
import "../chunk-FO7Z5LAL.mjs";
|
|
12
12
|
import "../chunk-FLV3J3VX.mjs";
|
|
13
13
|
import "../chunk-YOH25I6N.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CopilotChat
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-I454U2HM.mjs";
|
|
17
17
|
import "../chunk-V7W6IM2V.mjs";
|
|
18
18
|
import "../chunk-WCPLXRZX.mjs";
|
|
19
19
|
import "../chunk-I4QG2ZZU.mjs";
|
|
@@ -21,7 +21,7 @@ import "../chunk-H7TM5JE6.mjs";
|
|
|
21
21
|
import "../chunk-OTPAZXVR.mjs";
|
|
22
22
|
import "../chunk-U6J5DGOE.mjs";
|
|
23
23
|
import "../chunk-YQFVRDNC.mjs";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-4K36ATCD.mjs";
|
|
25
25
|
import "../chunk-YQ3D5IQV.mjs";
|
|
26
26
|
import "../chunk-XSUSSWDS.mjs";
|
|
27
27
|
import {
|
package/dist/index.js
CHANGED
|
@@ -1053,22 +1053,35 @@ var Messages = ({ messages, inProgress, children }) => {
|
|
|
1053
1053
|
} else if (message.status.code !== import_runtime_client_gql.MessageStatusCode.Pending) {
|
|
1054
1054
|
status = "executing";
|
|
1055
1055
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1056
|
+
try {
|
|
1057
|
+
const toRender = render({
|
|
1058
|
+
status,
|
|
1059
|
+
args,
|
|
1060
|
+
result: functionResults[message.id]
|
|
1061
|
+
});
|
|
1062
|
+
if (!toRender && status === "complete") {
|
|
1063
|
+
return null;
|
|
1064
|
+
}
|
|
1065
|
+
if (typeof toRender === "string") {
|
|
1066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
1067
|
+
isCurrentMessage && inProgress && context.icons.spinnerIcon,
|
|
1068
|
+
" ",
|
|
1069
|
+
toRender
|
|
1070
|
+
] }, index);
|
|
1071
|
+
} else {
|
|
1072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
|
|
1073
|
+
}
|
|
1074
|
+
} catch (e) {
|
|
1075
|
+
console.error(`Error executing render function for action ${message.name}: ${e}`);
|
|
1065
1076
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
1066
1077
|
isCurrentMessage && inProgress && context.icons.spinnerIcon,
|
|
1067
|
-
|
|
1068
|
-
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
|
|
1079
|
+
"\u274C Error executing render: ",
|
|
1080
|
+
message.name
|
|
1081
|
+
] }),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
|
|
1083
|
+
e instanceof Error ? e.message : String(e)
|
|
1069
1084
|
] }, index);
|
|
1070
|
-
} else {
|
|
1071
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
|
|
1072
1085
|
}
|
|
1073
1086
|
}
|
|
1074
1087
|
} else if (!inProgress || !isCurrentMessage) {
|