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