@copilotkit/react-ui 1.3.5 → 1.3.6-pre-1-3-6.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-U7CXOZEV.mjs → chunk-HIX4HRWU.mjs} +2 -2
- package/dist/{chunk-3CQ72Y7E.mjs → chunk-P47XGGRX.mjs} +2 -2
- package/dist/{chunk-N4JRGTUJ.mjs → chunk-RF3KLUPD.mjs} +2 -2
- package/dist/chunk-RF3KLUPD.mjs.map +1 -0
- package/dist/{chunk-P4N6EWUO.mjs → chunk-SPZEI5EN.mjs} +2 -2
- package/dist/{chunk-FRFXYFEH.mjs → chunk-TSQVQAAC.mjs} +2 -2
- package/dist/components/chat/Chat.js +1 -1
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +2 -2
- package/dist/components/chat/Modal.js +1 -1
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +3 -3
- package/dist/components/chat/Popup.js +1 -1
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +4 -4
- package/dist/components/chat/Sidebar.js +1 -1
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +4 -4
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +5 -5
- package/dist/components/chat/messages/RenderAgentStateMessage.js +1 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/package.json +7 -7
- package/src/components/chat/messages/RenderAgentStateMessage.tsx +3 -2
- package/dist/chunk-N4JRGTUJ.mjs.map +0 -1
- /package/dist/{chunk-U7CXOZEV.mjs.map → chunk-HIX4HRWU.mjs.map} +0 -0
- /package/dist/{chunk-3CQ72Y7E.mjs.map → chunk-P47XGGRX.mjs.map} +0 -0
- /package/dist/{chunk-P4N6EWUO.mjs.map → chunk-SPZEI5EN.mjs.map} +0 -0
- /package/dist/{chunk-FRFXYFEH.mjs.map → chunk-TSQVQAAC.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 1.3.6-pre-1-3-6.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Rename useCoAgentStateRender
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @copilotkit/react-core@1.3.6-pre-1-3-6.0
|
|
10
|
+
- @copilotkit/runtime-client-gql@1.3.6-pre-1-3-6.0
|
|
11
|
+
- @copilotkit/shared@1.3.6-pre-1-3-6.0
|
|
12
|
+
|
|
3
13
|
## 1.3.5
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YH2STM73.mjs";
|
|
4
4
|
import {
|
|
5
5
|
RenderAgentStateMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RF3KLUPD.mjs";
|
|
7
7
|
import {
|
|
8
8
|
RenderResultMessage
|
|
9
9
|
} from "./chunk-GOTHQ665.mjs";
|
|
@@ -191,4 +191,4 @@ export {
|
|
|
191
191
|
WrappedCopilotChat,
|
|
192
192
|
useCopilotChatLogic
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-HIX4HRWU.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SPZEI5EN.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-P47XGGRX.mjs.map
|
|
@@ -13,7 +13,7 @@ function RenderAgentStateMessage(props) {
|
|
|
13
13
|
if (message instanceof AgentStateMessage) {
|
|
14
14
|
let render;
|
|
15
15
|
if (chatComponentsCache.current !== null) {
|
|
16
|
-
render = chatComponentsCache.current.
|
|
16
|
+
render = chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-${message.nodeName}`] || chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-global`];
|
|
17
17
|
}
|
|
18
18
|
if (render) {
|
|
19
19
|
if (typeof render === "string") {
|
|
@@ -63,4 +63,4 @@ function RenderAgentStateMessage(props) {
|
|
|
63
63
|
export {
|
|
64
64
|
RenderAgentStateMessage
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-RF3KLUPD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/messages/RenderAgentStateMessage.tsx"],"sourcesContent":["import { AgentStateMessage } from \"@copilotkit/runtime-client-gql\";\nimport { RenderMessageProps } from \"../props\";\nimport { useChatContext } from \"../ChatContext\";\nimport { CoagentInChatRenderFunction, useCopilotContext } from \"@copilotkit/react-core\";\n\nexport function RenderAgentStateMessage(props: RenderMessageProps) {\n const { message, inProgress, index, isCurrentMessage } = props;\n const { chatComponentsCache } = useCopilotContext();\n const { icons } = useChatContext();\n\n if (message instanceof AgentStateMessage) {\n let render: string | CoagentInChatRenderFunction | undefined;\n\n if (chatComponentsCache.current !== null) {\n render =\n chatComponentsCache.current.coAgentStateRenders[\n `${message.agentName}-${message.nodeName}`\n ] || chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-global`];\n }\n\n if (render) {\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 <div key={index} className={`copilotKitMessage copilotKitAssistantMessage`}>\n {icons.spinnerIcon} <span className=\"inProgressLabel\">{render}</span>\n </div>\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 state = message.state;\n\n let status = message.active ? \"inProgress\" : \"complete\";\n\n const toRender = render({\n status: status as any,\n state,\n nodeName: message.nodeName,\n });\n\n // No result and complete: stay silent\n if (!toRender && status === \"complete\") {\n return null;\n }\n\n if (!toRender && isCurrentMessage && inProgress) {\n return (\n <div key={index} className={`copilotKitMessage copilotKitAssistantMessage`}>\n {icons.spinnerIcon}\n </div>\n );\n } else if (!toRender) {\n return null;\n }\n\n if (typeof toRender === \"string\") {\n return (\n <div key={index} className={`copilotKitMessage copilotKitAssistantMessage`}>\n {isCurrentMessage && inProgress && icons.spinnerIcon} {toRender}\n </div>\n );\n } else {\n return (\n <div key={index} className=\"copilotKitCustomAssistantMessage\">\n {toRender}\n </div>\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 <div key={index} className={`copilotKitMessage copilotKitAssistantMessage`}>\n {icons.spinnerIcon}\n </div>\n );\n }\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,yBAAyB;AAGlC,SAAsC,yBAAyB;AAuBnD,SACsB,KADtB;AArBL,SAAS,wBAAwB,OAA2B;AACjE,QAAM,EAAE,SAAS,YAAY,OAAO,iBAAiB,IAAI;AACzD,QAAM,EAAE,oBAAoB,IAAI,kBAAkB;AAClD,QAAM,EAAE,MAAM,IAAI,eAAe;AAEjC,MAAI,mBAAmB,mBAAmB;AACxC,QAAI;AAEJ,QAAI,oBAAoB,YAAY,MAAM;AACxC,eACE,oBAAoB,QAAQ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|
CopilotChat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HIX4HRWU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
Input
|
|
15
15
|
} from "./chunk-U6J5DGOE.mjs";
|
|
@@ -88,4 +88,4 @@ var CopilotModal = ({
|
|
|
88
88
|
export {
|
|
89
89
|
CopilotModal
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-SPZEI5EN.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SPZEI5EN.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-TSQVQAAC.mjs.map
|
|
@@ -1296,7 +1296,7 @@ function RenderAgentStateMessage(props) {
|
|
|
1296
1296
|
if (message instanceof import_runtime_client_gql6.AgentStateMessage) {
|
|
1297
1297
|
let render;
|
|
1298
1298
|
if (chatComponentsCache.current !== null) {
|
|
1299
|
-
render = chatComponentsCache.current.
|
|
1299
|
+
render = chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-${message.nodeName}`] || chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-global`];
|
|
1300
1300
|
}
|
|
1301
1301
|
if (render) {
|
|
1302
1302
|
if (typeof render === "string") {
|