@copilotkit/react-core 1.55.1 → 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 CHANGED
@@ -1,5 +1,16 @@
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
+
3
14
  ## 1.55.1
4
15
 
5
16
  ### 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: params.role || "user",
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-Bz5-ImDl.cjs.map
9922
+ //# sourceMappingURL=copilotkit-7z4C8joY.cjs.map