@copilotkit/react-core 2.0.0-rc.41 → 2.0.0-rc.42

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/dist/index.mjs CHANGED
@@ -819,7 +819,7 @@ function ɵuseOwnedCore(ref, create) {
819
819
 
820
820
  //#endregion
821
821
  //#region package.json
822
- var version$1 = "2.0.0-rc.41";
822
+ var version$1 = "2.0.0-rc.42";
823
823
 
824
824
  //#endregion
825
825
  //#region src/components/CopilotKitInspector.tsx
@@ -1399,19 +1399,21 @@ function ReactSurfaceHost({ surfaceId, operations, theme, agent, copilotkit, cat
1399
1399
  });
1400
1400
  }
1401
1401
  /**
1402
- * Renders the A2UI surface, or an error message if processing failed.
1402
+ * Renders the A2UI surface, with an error message above it if processing
1403
+ * failed. A rejected snapshot leaves the surface as it was, so the card the
1404
+ * user already sees stays visible next to the error.
1403
1405
  * Must be a child of A2UIProvider to access the error state.
1404
1406
  */
1405
1407
  function A2UISurfaceOrError({ surfaceId }) {
1406
1408
  const error = useA2UIError();
1407
- if (error) return /* @__PURE__ */ jsxs("div", {
1409
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [error && /* @__PURE__ */ jsxs("div", {
1410
+ role: "alert",
1408
1411
  className: "cpk-a2ui-message-error",
1409
1412
  children: ["A2UI render error: ", error]
1410
- });
1411
- return /* @__PURE__ */ jsx(A2UIRenderer, {
1413
+ }), /* @__PURE__ */ jsx(A2UIRenderer, {
1412
1414
  surfaceId,
1413
1415
  className: "cpk-a2ui-message-surface"
1414
- });
1416
+ })] });
1415
1417
  }
1416
1418
  /**
1417
1419
  * Applies the surface's operations to the provider's processor, reports each