langchain_agentx_stream_ui 0.3.3 → 0.3.4

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.js CHANGED
@@ -1455,6 +1455,13 @@ function sanitizeContainerTreeParentLinks(containersById) {
1455
1455
  }
1456
1456
  return next;
1457
1457
  }
1458
+ function normalizeSnapshotContainerContentBlocks(containersById) {
1459
+ const next = {};
1460
+ for (const [containerId, node] of Object.entries(containersById)) {
1461
+ next[containerId] = { ...node, content_blocks: node.content_blocks ?? [] };
1462
+ }
1463
+ return next;
1464
+ }
1458
1465
  function resolveContentScopeKey(data) {
1459
1466
  for (const keyName of ["stage_key", "item_key", "branch_key", "aggregate_key", "debug_key"]) {
1460
1467
  const value = readString(data, keyName);
@@ -2839,8 +2846,8 @@ function isAtOrBeforeProjectionCursor(projectionCursor, eventId) {
2839
2846
  function hydrateWorkflowFromSnapshot(state, snapshot, options = {}) {
2840
2847
  const authority = options.preserveAuthority ? state.authority : null;
2841
2848
  const containerTree = structuredClone(snapshot.containerTree);
2842
- containerTree.containersById = sanitizeContainerTreeParentLinks(
2843
- containerTree.containersById
2849
+ containerTree.containersById = normalizeSnapshotContainerContentBlocks(
2850
+ sanitizeContainerTreeParentLinks(containerTree.containersById)
2844
2851
  );
2845
2852
  return {
2846
2853
  ...createEmptyWorkflowSessionState(),