langchain_agentx_stream_ui 0.3.4 → 0.3.5

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.
@@ -650,8 +650,14 @@ function streamChunk(data) {
650
650
  function appendStreamChunk(current, data) {
651
651
  return (current ?? "") + streamChunk(data);
652
652
  }
653
+ function reactivateSessionIfIdle(tree) {
654
+ if (tree.status === "error") return;
655
+ if (tree.status !== "running" && tree.status !== "connecting") {
656
+ tree.status = "running";
657
+ }
658
+ }
653
659
  function handleStart(tree, event) {
654
- if (tree.status === "done" || tree.status === "error") {
660
+ if (tree.status === "error") {
655
661
  return;
656
662
  }
657
663
  tree.status = "running";
@@ -848,6 +854,7 @@ function flushDeferredMainTextToTree(tree, event, seq) {
848
854
  appendMainStageChild(tree, id, event, seq);
849
855
  }
850
856
  function handleTextStart(tree, event, seq) {
857
+ reactivateSessionIfIdle(tree);
851
858
  clearModelRetry(tree);
852
859
  const id = `text:${seq}`;
853
860
  const node = {
@@ -887,6 +894,7 @@ function handleTextEnd(tree, event) {
887
894
  };
888
895
  }
889
896
  function handleReasoningStart(tree, event, seq) {
897
+ reactivateSessionIfIdle(tree);
890
898
  const id = `reasoning:${seq}`;
891
899
  const roundId = `round-${seq}`;
892
900
  const node = {
@@ -1031,6 +1039,7 @@ function maybeSynthesizeLeakedToolProgress(tree, options, params) {
1031
1039
  });
1032
1040
  }
1033
1041
  function handleToolCall(tree, event, seq, options) {
1042
+ reactivateSessionIfIdle(tree);
1034
1043
  const id = toolNodeId(tree, event);
1035
1044
  const data = event.data;
1036
1045
  const existing = tree.byId[id];
@@ -5498,4 +5507,4 @@ export {
5498
5507
  VirtualTimeline,
5499
5508
  SessionTimeline
5500
5509
  };
5501
- //# sourceMappingURL=chunk-6ORA5RMV.js.map
5510
+ //# sourceMappingURL=chunk-6PWGGGUK.js.map