@octaviaflow/core 3.0.18-beta.34 → 3.0.18-beta.36

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
@@ -12641,7 +12641,7 @@ var COLLAPSED_HEIGHT = 36;
12641
12641
  var DEFAULT_EXPANDED_HEIGHT = 240;
12642
12642
  var ALL_LEVELS = ["info", "warn", "error", "debug", "success"];
12643
12643
  function ExecutionConsole({
12644
- open = false,
12644
+ open: openProp,
12645
12645
  onToggle,
12646
12646
  logs = [],
12647
12647
  running = false,
@@ -12660,13 +12660,14 @@ function ExecutionConsole({
12660
12660
  emptyState,
12661
12661
  className
12662
12662
  }) {
12663
+ const open = openProp ?? height != null;
12663
12664
  const logEndRef = useRef23(null);
12664
12665
  const logsRef = useRef23(null);
12665
12666
  const lastScrollTopRef = useRef23(0);
12666
12667
  const [query, setQuery] = useState22("");
12667
12668
  const [activeLevels, setActiveLevels] = useState22(() => new Set(ALL_LEVELS));
12668
12669
  const [activeNode, setActiveNode] = useState22("all");
12669
- const [autoScroll, setAutoScroll] = useState22(true);
12670
+ const [autoScroll, setAutoScroll] = useState22(running);
12670
12671
  const [expandedLines, setExpandedLines] = useState22(/* @__PURE__ */ new Set());
12671
12672
  const [exportMenuOpen, setExportMenuOpen] = useState22(false);
12672
12673
  const nodeOptions = useMemo15(() => {
@@ -12690,6 +12691,13 @@ function ExecutionConsole({
12690
12691
  return false;
12691
12692
  });
12692
12693
  }, [logs, query, activeLevels, activeNode]);
12694
+ const prevRunningRef = useRef23(running);
12695
+ useEffect19(() => {
12696
+ if (prevRunningRef.current !== running) {
12697
+ setAutoScroll(running);
12698
+ prevRunningRef.current = running;
12699
+ }
12700
+ }, [running]);
12693
12701
  useEffect19(() => {
12694
12702
  if (!open || !autoScroll) return;
12695
12703
  const el = logEndRef.current;