nolo-cli 0.75.0-alpha.3 → 0.75.0-alpha.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/index.js CHANGED
@@ -875,7 +875,7 @@ async function runScript(script, forwardedArgs, env) {
875
875
  return proc.exited;
876
876
  }
877
877
  async function launchTuiWorkspace(args2) {
878
- const { startTuiWorkspace } = await import("./readlineWorkspace-EGTGFPH4.js");
878
+ const { startTuiWorkspace } = await import("./readlineWorkspace-TM6BQGNJ.js");
879
879
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-3Z24VUWM.js");
880
880
  return startTuiWorkspace({
881
881
  ...args2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.75.0-alpha.3",
3
+ "version": "0.75.0-alpha.4",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -8526,6 +8526,8 @@ function createTuiRender(host) {
8526
8526
  // packages/cli/tui/tuiScrollAnimation.ts
8527
8527
  var SCROLL_ANIMATION_TICK_MS = 16;
8528
8528
  var DEFAULT_SCROLL_MAX_LINES_PER_TICK = 6;
8529
+ var ADAPTIVE_STEP_CAP = 20;
8530
+ var EXPLICIT_STEP_CAP = 100;
8529
8531
  function readPositiveInt(raw, fallback, max) {
8530
8532
  if (raw === void 0 || raw.trim() === "") return fallback;
8531
8533
  const parsed = Number.parseInt(raw, 10);
@@ -8533,15 +8535,20 @@ function readPositiveInt(raw, fallback, max) {
8533
8535
  return Math.min(parsed, max);
8534
8536
  }
8535
8537
  function resolveScrollTuning(env = process.env) {
8538
+ const rawStep = env.NOLO_TUI_SCROLL_MAX_STEP;
8539
+ const explicit = parseExplicitStep(rawStep);
8536
8540
  return {
8537
8541
  wheelLines: readPositiveInt(env.NOLO_TUI_WHEEL_LINES, WHEEL_SCROLL_LINES, 50),
8538
- maxLinesPerTick: readPositiveInt(
8539
- env.NOLO_TUI_SCROLL_MAX_STEP,
8540
- DEFAULT_SCROLL_MAX_LINES_PER_TICK,
8541
- 100
8542
- )
8542
+ maxLinesPerTick: explicit ?? DEFAULT_SCROLL_MAX_LINES_PER_TICK,
8543
+ adaptiveStep: explicit === null
8543
8544
  };
8544
8545
  }
8546
+ function parseExplicitStep(raw) {
8547
+ if (raw === void 0 || raw.trim() === "") return null;
8548
+ const parsed = Number.parseInt(raw, 10);
8549
+ if (!Number.isFinite(parsed) || parsed < 1) return null;
8550
+ return Math.min(parsed, EXPLICIT_STEP_CAP);
8551
+ }
8545
8552
  var defaultTickTimer = {
8546
8553
  every(ms, fn) {
8547
8554
  const handle = setInterval(fn, ms);
@@ -8550,9 +8557,10 @@ var defaultTickTimer = {
8550
8557
  }
8551
8558
  };
8552
8559
  function createScrollAnimator(deps) {
8553
- const { wheelLines, maxLinesPerTick } = resolveScrollTuning(
8560
+ const { wheelLines, maxLinesPerTick, adaptiveStep } = resolveScrollTuning(
8554
8561
  deps.env ?? process.env
8555
8562
  );
8563
+ const stepCap = adaptiveStep ? Math.max(ADAPTIVE_STEP_CAP, wheelLines) : maxLinesPerTick;
8556
8564
  const timer = deps.tickTimer ?? defaultTickTimer;
8557
8565
  const history = deps.history;
8558
8566
  let goal = null;
@@ -8590,7 +8598,17 @@ function createScrollAnimator(deps) {
8590
8598
  settle(maxScrollTop);
8591
8599
  return;
8592
8600
  }
8593
- const step = Math.sign(delta) * Math.min(Math.abs(delta), maxLinesPerTick);
8601
+ const backlog = Math.abs(delta);
8602
+ const limit = adaptiveStep ? Math.min(
8603
+ backlog,
8604
+ Math.max(
8605
+ DEFAULT_SCROLL_MAX_LINES_PER_TICK,
8606
+ wheelLines,
8607
+ Math.ceil(backlog / 4)
8608
+ ),
8609
+ stepCap
8610
+ ) : Math.min(backlog, maxLinesPerTick);
8611
+ const step = Math.sign(delta) * limit;
8594
8612
  history.scrollTop += step;
8595
8613
  deps.onPaint();
8596
8614
  if (history.scrollTop === goal) {