@copilotkit/react-ui 1.3.5 → 1.3.6
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 +12 -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/{chunk-5HHVL5WK.mjs → chunk-Z2UZSN3K.mjs} +2 -2
- package/dist/{chunk-5HHVL5WK.mjs.map → chunk-Z2UZSN3K.mjs.map} +1 -1
- 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/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.js +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -1
- package/dist/hooks/use-copilot-chat-suggestions.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/package.json +7 -7
- package/src/components/chat/messages/RenderAgentStateMessage.tsx +3 -2
- package/src/hooks/use-copilot-chat-suggestions.tsx +1 -1
- 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/dist/index.mjs
CHANGED
|
@@ -4,21 +4,21 @@ import "./chunk-JD7BAH7U.mjs";
|
|
|
4
4
|
import "./chunk-MRFF7GSQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
CopilotSidebar
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P47XGGRX.mjs";
|
|
8
8
|
import "./chunk-WB3YULQ4.mjs";
|
|
9
9
|
import {
|
|
10
10
|
CopilotPopup
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-TSQVQAAC.mjs";
|
|
12
|
+
import "./chunk-SPZEI5EN.mjs";
|
|
13
13
|
import "./chunk-FO7Z5LAL.mjs";
|
|
14
14
|
import "./chunk-FLV3J3VX.mjs";
|
|
15
15
|
import "./chunk-YOH25I6N.mjs";
|
|
16
16
|
import {
|
|
17
17
|
CopilotChat
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HIX4HRWU.mjs";
|
|
19
19
|
import "./chunk-V7W6IM2V.mjs";
|
|
20
20
|
import "./chunk-YH2STM73.mjs";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-RF3KLUPD.mjs";
|
|
22
22
|
import "./chunk-GOTHQ665.mjs";
|
|
23
23
|
import "./chunk-MA5B5ELM.mjs";
|
|
24
24
|
import "./chunk-WCPLXRZX.mjs";
|
|
@@ -39,7 +39,7 @@ import "./chunk-IU3WTXLQ.mjs";
|
|
|
39
39
|
import "./chunk-T26KLXLH.mjs";
|
|
40
40
|
import {
|
|
41
41
|
useCopilotChatSuggestions
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Z2UZSN3K.mjs";
|
|
43
43
|
import "./chunk-54JAUBUJ.mjs";
|
|
44
44
|
import "./chunk-VOBX4JOA.mjs";
|
|
45
45
|
import "./chunk-MRXNTQOX.mjs";
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.3.
|
|
12
|
+
"version": "1.3.6",
|
|
13
13
|
"sideEffects": [
|
|
14
14
|
"**/*.css"
|
|
15
15
|
],
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"ts-jest": "^29.1.1",
|
|
41
41
|
"tsup": "^6.7.0",
|
|
42
42
|
"typescript": "^5.2.3",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"tsconfig": "1.3.
|
|
43
|
+
"tailwind-config": "1.3.6",
|
|
44
|
+
"eslint-config-custom": "1.3.6",
|
|
45
|
+
"tsconfig": "1.3.6"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@headlessui/react": "^2.1.3",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"react-syntax-highlighter": "^15.5.0",
|
|
51
51
|
"remark-gfm": "^3.0.1",
|
|
52
52
|
"remark-math": "^5.1.1",
|
|
53
|
-
"@copilotkit/
|
|
54
|
-
"@copilotkit/runtime-client-gql": "1.3.
|
|
55
|
-
"@copilotkit/
|
|
53
|
+
"@copilotkit/react-core": "1.3.6",
|
|
54
|
+
"@copilotkit/runtime-client-gql": "1.3.6",
|
|
55
|
+
"@copilotkit/shared": "1.3.6"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"copilotkit",
|
|
@@ -13,8 +13,9 @@ export function RenderAgentStateMessage(props: RenderMessageProps) {
|
|
|
13
13
|
|
|
14
14
|
if (chatComponentsCache.current !== null) {
|
|
15
15
|
render =
|
|
16
|
-
chatComponentsCache.current.
|
|
17
|
-
|
|
16
|
+
chatComponentsCache.current.coAgentStateRenders[
|
|
17
|
+
`${message.agentName}-${message.nodeName}`
|
|
18
|
+
] || chatComponentsCache.current.coAgentStateRenders[`${message.agentName}-global`];
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
if (render) {
|
|
@@ -1 +0,0 @@
|
|
|
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.coagentActions[`${message.agentName}-${message.nodeName}`] ||\n chatComponentsCache.current.coagentActions[`${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;AAsBnD,SACsB,KADtB;AApBL,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,eAAe,GAAG,QAAQ,aAAa,QAAQ,UAAU,KACrF,oBAAoB,QAAQ,eAAe,GAAG,QAAQ,kBAAkB;AAAA,IAC5E;AAEA,QAAI,QAAQ;AAEV,UAAI,OAAO,WAAW,UAAU;AAE9B,YAAI,oBAAoB,YAAY;AAClC,iBACE,qBAA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