@copilotkit/react-ui 1.5.12-next.3 → 1.5.12-next.4
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 +8 -0
- package/dist/{chunk-I7MG52I5.mjs → chunk-3CGR5FXK.mjs} +11 -11
- package/dist/{chunk-B23XDGH4.mjs → chunk-CIP6WIZY.mjs} +2 -2
- package/dist/{chunk-O6JFOQQA.mjs → chunk-GUIGQMEU.mjs} +2 -2
- package/dist/{chunk-F2W5FD7L.mjs → chunk-HZGELGAZ.mjs} +6 -6
- package/dist/{chunk-VKVNMHM5.mjs → chunk-VN6664CL.mjs} +8 -8
- package/dist/{chunk-P5A3A5FO.mjs → chunk-XB6QCUPB.mjs} +6 -6
- package/dist/{chunk-P5A3A5FO.mjs.map → chunk-XB6QCUPB.mjs.map} +1 -1
- package/dist/components/chat/Chat.js +5 -5
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +13 -13
- package/dist/components/chat/Modal.js +5 -5
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +15 -15
- package/dist/components/chat/Popup.js +5 -5
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +16 -16
- package/dist/components/chat/Sidebar.js +5 -5
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +16 -16
- package/dist/components/chat/index.js +5 -5
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +19 -19
- package/dist/components/chat/messages/AssistantMessage.mjs +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.js +5 -5
- 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.mjs +3 -3
- package/dist/components/dev-console/index.mjs +5 -5
- package/dist/components/index.js +5 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +23 -23
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -23
- package/package.json +4 -4
- package/src/components/chat/messages/RenderActionExecutionMessage.tsx +3 -4
- /package/dist/{chunk-I7MG52I5.mjs.map → chunk-3CGR5FXK.mjs.map} +0 -0
- /package/dist/{chunk-B23XDGH4.mjs.map → chunk-CIP6WIZY.mjs.map} +0 -0
- /package/dist/{chunk-O6JFOQQA.mjs.map → chunk-GUIGQMEU.mjs.map} +0 -0
- /package/dist/{chunk-F2W5FD7L.mjs.map → chunk-HZGELGAZ.mjs.map} +0 -0
- /package/dist/{chunk-VKVNMHM5.mjs.map → chunk-VN6664CL.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -15,27 +15,27 @@ import {
|
|
|
15
15
|
} from "./chunk-3VNMQWGT.mjs";
|
|
16
16
|
import {
|
|
17
17
|
RenderActionExecutionMessage
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XB6QCUPB.mjs";
|
|
19
|
+
import {
|
|
20
|
+
Messages
|
|
21
|
+
} from "./chunk-34FREWVK.mjs";
|
|
22
|
+
import {
|
|
23
|
+
ResponseButton
|
|
24
|
+
} from "./chunk-3XAXY2Z3.mjs";
|
|
19
25
|
import {
|
|
20
26
|
Suggestion,
|
|
21
27
|
reloadSuggestions
|
|
22
28
|
} from "./chunk-RJCZRKTV.mjs";
|
|
23
|
-
import {
|
|
24
|
-
CopilotDevConsole
|
|
25
|
-
} from "./chunk-F2W5FD7L.mjs";
|
|
26
29
|
import {
|
|
27
30
|
Input
|
|
28
31
|
} from "./chunk-EMQEEXUB.mjs";
|
|
29
|
-
import {
|
|
30
|
-
Messages
|
|
31
|
-
} from "./chunk-34FREWVK.mjs";
|
|
32
|
-
import {
|
|
33
|
-
ResponseButton
|
|
34
|
-
} from "./chunk-3XAXY2Z3.mjs";
|
|
35
32
|
import {
|
|
36
33
|
ChatContext,
|
|
37
34
|
ChatContextProvider
|
|
38
35
|
} from "./chunk-CBBFRI3Q.mjs";
|
|
36
|
+
import {
|
|
37
|
+
CopilotDevConsole
|
|
38
|
+
} from "./chunk-HZGELGAZ.mjs";
|
|
39
39
|
import {
|
|
40
40
|
__async,
|
|
41
41
|
__spreadProps,
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
WrappedCopilotChat,
|
|
312
312
|
useCopilotChatLogic
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-3CGR5FXK.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VN6664CL.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -27,4 +27,4 @@ function CopilotSidebar(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
CopilotSidebar
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-CIP6WIZY.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VN6664CL.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -18,4 +18,4 @@ function CopilotPopup(props) {
|
|
|
18
18
|
export {
|
|
19
19
|
CopilotPopup
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-GUIGQMEU.mjs.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CopilotKitHelpModal
|
|
3
|
+
} from "./chunk-TI7SY2RI.mjs";
|
|
1
4
|
import {
|
|
2
5
|
getPublishedCopilotKitVersion,
|
|
3
6
|
logActions,
|
|
@@ -6,8 +9,8 @@ import {
|
|
|
6
9
|
shouldShowDevConsole
|
|
7
10
|
} from "./chunk-PNQVKBPN.mjs";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
SmallSpinnerIcon
|
|
13
|
+
} from "./chunk-FZC7X5PK.mjs";
|
|
11
14
|
import {
|
|
12
15
|
CheckIcon,
|
|
13
16
|
ChevronDownIcon,
|
|
@@ -15,9 +18,6 @@ import {
|
|
|
15
18
|
ExclamationMarkIcon,
|
|
16
19
|
ExclamationMarkTriangleIcon
|
|
17
20
|
} from "./chunk-OTPAZXVR.mjs";
|
|
18
|
-
import {
|
|
19
|
-
SmallSpinnerIcon
|
|
20
|
-
} from "./chunk-FZC7X5PK.mjs";
|
|
21
21
|
|
|
22
22
|
// src/components/dev-console/console.tsx
|
|
23
23
|
import { useCopilotContext, useCopilotMessagesContext } from "@copilotkit/react-core";
|
|
@@ -229,4 +229,4 @@ export {
|
|
|
229
229
|
CopilotDevConsole,
|
|
230
230
|
DebugMenuButton
|
|
231
231
|
};
|
|
232
|
-
//# sourceMappingURL=chunk-
|
|
232
|
+
//# sourceMappingURL=chunk-HZGELGAZ.mjs.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Window
|
|
3
3
|
} from "./chunk-YAGE7RCE.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Header
|
|
6
|
-
} from "./chunk-VEC45H6Q.mjs";
|
|
7
4
|
import {
|
|
8
5
|
Button
|
|
9
6
|
} from "./chunk-RQNJNK2W.mjs";
|
|
10
7
|
import {
|
|
11
8
|
CopilotChat
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3CGR5FXK.mjs";
|
|
13
10
|
import {
|
|
14
11
|
UserMessage
|
|
15
12
|
} from "./chunk-HEIDCT7I.mjs";
|
|
16
13
|
import {
|
|
17
14
|
AssistantMessage
|
|
18
15
|
} from "./chunk-3VNMQWGT.mjs";
|
|
19
|
-
import {
|
|
20
|
-
Input
|
|
21
|
-
} from "./chunk-EMQEEXUB.mjs";
|
|
22
16
|
import {
|
|
23
17
|
Messages
|
|
24
18
|
} from "./chunk-34FREWVK.mjs";
|
|
25
19
|
import {
|
|
26
20
|
ResponseButton
|
|
27
21
|
} from "./chunk-3XAXY2Z3.mjs";
|
|
22
|
+
import {
|
|
23
|
+
Header
|
|
24
|
+
} from "./chunk-VEC45H6Q.mjs";
|
|
25
|
+
import {
|
|
26
|
+
Input
|
|
27
|
+
} from "./chunk-EMQEEXUB.mjs";
|
|
28
28
|
import {
|
|
29
29
|
ChatContextProvider
|
|
30
30
|
} from "./chunk-CBBFRI3Q.mjs";
|
|
@@ -102,4 +102,4 @@ var CopilotModal = ({
|
|
|
102
102
|
export {
|
|
103
103
|
CopilotModal
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-VN6664CL.mjs.map
|
|
@@ -76,13 +76,13 @@ function RenderActionExecutionMessage(props) {
|
|
|
76
76
|
"data-message-role": "assistant",
|
|
77
77
|
isLoading: false,
|
|
78
78
|
isGenerating: false,
|
|
79
|
-
subComponent: /* @__PURE__ */ jsxs("div", { children: [
|
|
79
|
+
subComponent: /* @__PURE__ */ jsxs("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
|
|
80
80
|
/* @__PURE__ */ jsxs("b", { children: [
|
|
81
|
-
"\u274C Error executing render
|
|
82
|
-
message.name
|
|
81
|
+
"\u274C Error executing render function for action ",
|
|
82
|
+
message.name,
|
|
83
|
+
":"
|
|
83
84
|
] }),
|
|
84
|
-
/* @__PURE__ */ jsx("
|
|
85
|
-
e instanceof Error ? e.message : String(e)
|
|
85
|
+
/* @__PURE__ */ jsx("pre", { children: e instanceof Error ? e.message : String(e) })
|
|
86
86
|
] })
|
|
87
87
|
},
|
|
88
88
|
index
|
|
@@ -109,4 +109,4 @@ function RenderActionExecutionMessage(props) {
|
|
|
109
109
|
export {
|
|
110
110
|
RenderActionExecutionMessage
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-XB6QCUPB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat/messages/RenderActionExecutionMessage.tsx"],"sourcesContent":["import { MessageStatusCode } from \"@copilotkit/runtime-client-gql\";\nimport { RenderMessageProps } from \"../props\";\nimport { RenderFunctionStatus, useCopilotContext } from \"@copilotkit/react-core\";\n\nexport function RenderActionExecutionMessage(props: RenderMessageProps) {\n const { chatComponentsCache } = useCopilotContext();\n const { message, inProgress, index, isCurrentMessage, actionResult, AssistantMessage } = props;\n\n if (message.isActionExecutionMessage()) {\n if (\n chatComponentsCache.current !== null &&\n (chatComponentsCache.current.actions[message.name] ||\n chatComponentsCache.current.actions[\"*\"])\n ) {\n const render =\n chatComponentsCache.current.actions[message.name] ||\n chatComponentsCache.current.actions[\"*\"];\n // render a static string\n if (typeof render === \"string\") {\n // when render is static, we show it only when in progress\n if (isCurrentMessage && inProgress) {\n return (\n <AssistantMessage\n rawData={message}\n key={index}\n data-message-role=\"assistant\"\n isLoading={false}\n isGenerating={true}\n message={render}\n />\n );\n }\n // Done - silent by default to avoid a series of \"done\" messages\n else {\n return null;\n }\n }\n // render is a function\n else {\n const args = message.arguments;\n\n let status: RenderFunctionStatus = \"inProgress\";\n\n if (actionResult !== undefined) {\n status = \"complete\";\n } else if (message.status.code !== MessageStatusCode.Pending) {\n status = \"executing\";\n }\n\n try {\n const toRender = render({\n status: status as any,\n args,\n result: actionResult,\n name: message.name,\n });\n // No result and complete: stay silent\n if (!toRender && status === \"complete\") {\n return null;\n }\n if (typeof toRender === \"string\") {\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"assistant\"\n key={index}\n isLoading={false}\n isGenerating={false}\n message={toRender}\n />\n );\n } else {\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"action-render\"\n key={index}\n isLoading={false}\n isGenerating={false}\n subComponent={toRender}\n />\n );\n }\n } catch (e) {\n console.error(`Error executing render function for action ${message.name}: ${e}`);\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"assistant\"\n key={index}\n isLoading={false}\n isGenerating={false}\n subComponent={\n <div>\n <b>❌ Error executing render
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/messages/RenderActionExecutionMessage.tsx"],"sourcesContent":["import { MessageStatusCode } from \"@copilotkit/runtime-client-gql\";\nimport { RenderMessageProps } from \"../props\";\nimport { RenderFunctionStatus, useCopilotContext } from \"@copilotkit/react-core\";\n\nexport function RenderActionExecutionMessage(props: RenderMessageProps) {\n const { chatComponentsCache } = useCopilotContext();\n const { message, inProgress, index, isCurrentMessage, actionResult, AssistantMessage } = props;\n\n if (message.isActionExecutionMessage()) {\n if (\n chatComponentsCache.current !== null &&\n (chatComponentsCache.current.actions[message.name] ||\n chatComponentsCache.current.actions[\"*\"])\n ) {\n const render =\n chatComponentsCache.current.actions[message.name] ||\n chatComponentsCache.current.actions[\"*\"];\n // render a static string\n if (typeof render === \"string\") {\n // when render is static, we show it only when in progress\n if (isCurrentMessage && inProgress) {\n return (\n <AssistantMessage\n rawData={message}\n key={index}\n data-message-role=\"assistant\"\n isLoading={false}\n isGenerating={true}\n message={render}\n />\n );\n }\n // Done - silent by default to avoid a series of \"done\" messages\n else {\n return null;\n }\n }\n // render is a function\n else {\n const args = message.arguments;\n\n let status: RenderFunctionStatus = \"inProgress\";\n\n if (actionResult !== undefined) {\n status = \"complete\";\n } else if (message.status.code !== MessageStatusCode.Pending) {\n status = \"executing\";\n }\n\n try {\n const toRender = render({\n status: status as any,\n args,\n result: actionResult,\n name: message.name,\n });\n // No result and complete: stay silent\n if (!toRender && status === \"complete\") {\n return null;\n }\n if (typeof toRender === \"string\") {\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"assistant\"\n key={index}\n isLoading={false}\n isGenerating={false}\n message={toRender}\n />\n );\n } else {\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"action-render\"\n key={index}\n isLoading={false}\n isGenerating={false}\n subComponent={toRender}\n />\n );\n }\n } catch (e) {\n console.error(`Error executing render function for action ${message.name}: ${e}`);\n return (\n <AssistantMessage\n rawData={message}\n data-message-role=\"assistant\"\n key={index}\n isLoading={false}\n isGenerating={false}\n subComponent={\n <div className=\"copilotKitMessage copilotKitAssistantMessage\">\n <b>❌ Error executing render function for action {message.name}:</b>\n <pre>{e instanceof Error ? e.message : String(e)}</pre>\n </div>\n }\n />\n );\n }\n }\n }\n // No render function found- show the default message\n else if (!inProgress || !isCurrentMessage) {\n // Done - silent by default to avoid a series of \"done\" messages\n return null;\n } else {\n // In progress\n return (\n <AssistantMessage\n rawData={message}\n key={index}\n data-message-role=\"assistant\"\n isLoading={true}\n isGenerating={true}\n />\n );\n }\n }\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAElC,SAA+B,yBAAyB;AAoB5C,cAwEM,YAxEN;AAlBL,SAAS,6BAA6B,OAA2B;AACtE,QAAM,EAAE,oBAAoB,IAAI,kBAAkB;AAClD,QAAM,EAAE,SAAS,YAAY,OAAO,kBAAkB,cAAc,iBAAiB,IAAI;AAEzF,MAAI,QAAQ,yBAAyB,GAAG;AACtC,QACE,oBAAoB,YAAY,SAC/B,oBAAoB,QAAQ,QAAQ,QAAQ,IAAI,KAC/C,oBAAoB,QAAQ,QAAQ,GAAG,IACzC;AACA,YAAM,SACJ,oBAAoB,QAAQ,QAAQ,QAAQ,IAAI,KAChD,oBAAoB,QAAQ,QAAQ,GAAG;AAEzC,UAAI,OAAO,WAAW,UAAU;AAE9B,YAAI,oBAAoB,YAAY;AAClC,iBACE;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cAET,qBAAkB;AAAA,cAClB,WAAW;AAAA,cACX,cAAc;AAAA,cACd,SAAS;AAAA;AAAA,YAJJ;AAAA,UAKP;AAAA,QAEJ,OAEK;AACH,iBAAO;AAAA,QACT;AAAA,MACF,OAEK;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;AAAA,UACC,SAAS;AAAA,UAET,qBAAkB;AAAA,UAClB,WAAW;AAAA,UACX,cAAc;AAAA;AAAA,QAHT;AAAA,MAIP;AAAA,IAEJ;AAAA,EACF;AACF;","names":[]}
|
|
@@ -915,13 +915,13 @@ function RenderActionExecutionMessage(props) {
|
|
|
915
915
|
"data-message-role": "assistant",
|
|
916
916
|
isLoading: false,
|
|
917
917
|
isGenerating: false,
|
|
918
|
-
subComponent: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
918
|
+
subComponent: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
|
|
919
919
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
|
|
920
|
-
"\u274C Error executing render
|
|
921
|
-
message.name
|
|
920
|
+
"\u274C Error executing render function for action ",
|
|
921
|
+
message.name,
|
|
922
|
+
":"
|
|
922
923
|
] }),
|
|
923
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("
|
|
924
|
-
e instanceof Error ? e.message : String(e)
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { children: e instanceof Error ? e.message : String(e) })
|
|
925
925
|
] })
|
|
926
926
|
},
|
|
927
927
|
index
|