@copilotkit/react-core 1.55.1-next.0 → 1.55.2-next.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 +21 -0
- package/dist/{copilotkit-Bz5-ImDl.cjs → copilotkit-7z4C8joY.cjs} +5 -2
- package/dist/copilotkit-7z4C8joY.cjs.map +1 -0
- package/dist/copilotkit-BuhSUZHb.d.mts.map +1 -1
- package/dist/{copilotkit-BY5S1-0P.mjs → copilotkit-OhEIYGcY.mjs} +5 -2
- package/dist/copilotkit-OhEIYGcY.mjs.map +1 -0
- package/dist/copilotkit-dwDWYpya.d.cts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +5 -2
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/src/v2/components/MCPAppsActivityRenderer.tsx +32 -2
- package/src/v2/components/chat/__tests__/MCPAppsProxy.e2e.test.tsx +589 -0
- package/src/v2/components/chat/__tests__/MCPAppsUiMessage.e2e.test.tsx +458 -0
- package/dist/copilotkit-BY5S1-0P.mjs.map +0 -1
- package/dist/copilotkit-Bz5-ImDl.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 1.55.2-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [62c6042]
|
|
8
|
+
- @copilotkit/a2ui-renderer@1.55.2-next.0
|
|
9
|
+
- @copilotkit/core@1.55.2-next.0
|
|
10
|
+
- @copilotkit/runtime-client-gql@1.55.2-next.0
|
|
11
|
+
- @copilotkit/shared@1.55.2-next.0
|
|
12
|
+
- @copilotkit/web-inspector@1.55.2-next.0
|
|
13
|
+
|
|
14
|
+
## 1.55.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- @copilotkit/a2ui-renderer@1.55.1
|
|
19
|
+
- @copilotkit/core@1.55.1
|
|
20
|
+
- @copilotkit/runtime-client-gql@1.55.1
|
|
21
|
+
- @copilotkit/shared@1.55.1
|
|
22
|
+
- @copilotkit/web-inspector@1.55.1
|
|
23
|
+
|
|
3
24
|
## 1.55.1-next.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1630,6 +1630,7 @@ function isNotification(msg) {
|
|
|
1630
1630
|
* Fetches resource content on-demand via proxied MCP requests.
|
|
1631
1631
|
*/
|
|
1632
1632
|
const MCPAppsActivityRenderer = function MCPAppsActivityRenderer({ content, agent }) {
|
|
1633
|
+
const { copilotkit } = useCopilotKit();
|
|
1633
1634
|
const containerRef = (0, react.useRef)(null);
|
|
1634
1635
|
const iframeRef = (0, react.useRef)(null);
|
|
1635
1636
|
const [iframeReady, setIframeReady] = (0, react.useState)(false);
|
|
@@ -1803,13 +1804,15 @@ const MCPAppsActivityRenderer = function MCPAppsActivityRenderer({ content, agen
|
|
|
1803
1804
|
}
|
|
1804
1805
|
try {
|
|
1805
1806
|
const params = msg.params;
|
|
1807
|
+
const role = params.role || "user";
|
|
1806
1808
|
const textContent = params.content?.filter((c) => c.type === "text" && c.text).map((c) => c.text).join("\n") || "";
|
|
1807
1809
|
if (textContent) currentAgent.addMessage({
|
|
1808
1810
|
id: crypto.randomUUID(),
|
|
1809
|
-
role
|
|
1811
|
+
role,
|
|
1810
1812
|
content: textContent
|
|
1811
1813
|
});
|
|
1812
1814
|
sendResponse(msg.id, { isError: false });
|
|
1815
|
+
if ((params.followUp ?? role === "user") && textContent) mcpAppsRequestQueue.enqueue(currentAgent, () => copilotkit.runAgent({ agent: currentAgent })).catch((err) => console.error("[MCPAppsRenderer] ui/message agent run failed:", err));
|
|
1813
1816
|
} catch (err) {
|
|
1814
1817
|
console.error("[MCPAppsRenderer] ui/message error:", err);
|
|
1815
1818
|
sendResponse(msg.id, { isError: true });
|
|
@@ -9916,4 +9919,4 @@ Object.defineProperty(exports, 'useToast', {
|
|
|
9916
9919
|
return useToast;
|
|
9917
9920
|
}
|
|
9918
9921
|
});
|
|
9919
|
-
//# sourceMappingURL=copilotkit-
|
|
9922
|
+
//# sourceMappingURL=copilotkit-7z4C8joY.cjs.map
|