@buildaharness/aielia 0.3.6 → 0.3.8

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.
@@ -5,9 +5,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
5
5
  import { Readable, Writable } from "node:stream";
6
6
  import { useState, useRef, useEffect, useMemo, useCallback, useSyncExternalStore } from "react";
7
7
  import { useWindowSize, usePaste, useInput, Box, Text, render, Static } from "ink";
8
- import { s as sanitizeLabel, r as renderPlan, t as toLines, a as runCli, P as PLAN_LINE_PREFIX, I as ICONS } from "./bin-BYRl4xXM.js";
8
+ import { s as sanitizeLabel, r as renderPlan, t as toLines, a as runCli, P as PLAN_LINE_PREFIX, I as ICONS } from "./bin-DETwedpj.js";
9
9
  import { format } from "node:util";
10
- import { n as DIFF_INDENT, bL as stripTerminalControls } from "./provider-setup-CV3S_TAS.js";
10
+ import { o as DIFF_INDENT, bM as stripTerminalControls } from "./provider-setup-wX2IBw2X.js";
11
11
  function classify(raw, stream) {
12
12
  if (raw.startsWith("\r")) {
13
13
  return { type: "progress", text: raw.replace(/\r/g, "").trimEnd() };
@@ -935,8 +935,13 @@ function TuiApp(props) {
935
935
  graphView.mode === "pane" && pending && !pending.options && /* @__PURE__ */ jsx(TuiInput, { promptLabel: pending.question, onSubmitChat: handleSubmitChat, onSubmitPrompt: handleSubmitPrompt, columns })
936
936
  ] });
937
937
  }
938
+ const usedRows = staticItems.reduce((sum, line) => sum + Math.max(1, Math.ceil(line.text.length / Math.max(1, width))) + (line.kind === "user" || line.kind === "plan" || line.kind === "approval" ? 2 : 0), 0);
939
+ const statusRows = Math.max(1, Math.ceil(statusIndicators.reduce((sum, indicator) => sum + indicator.length + 3, 0) / Math.max(1, width)) + 1);
940
+ const liveRows = (hasTransient ? 1 + log.progressText.split("\n").length + log.transientText.split("\n").length : 0) + 1 + 3 + statusRows;
941
+ const fillerRows = Math.max(0, (windowSize.rows ?? 24) - 1 - usedRows - liveRows);
938
942
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
939
943
  /* @__PURE__ */ jsx(Static, { items: staticItems, children: (line, index) => /* @__PURE__ */ jsx(LogLineText, { line, width }, index) }),
944
+ fillerRows > 0 && /* @__PURE__ */ jsx(Box, { height: fillerRows }),
940
945
  hasTransient && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
941
946
  log.progressText.length > 0 && /* @__PURE__ */ jsx(Text, { dimColor: true, children: log.progressText }),
942
947
  log.transientText.length > 0 && /* @__PURE__ */ jsx(Text, { children: stripAssistantLabel(log.transientText) })
@@ -977,6 +982,9 @@ async function runTuiApp(options = {}) {
977
982
  const prompt = new PromptBridge();
978
983
  const status = new StatusBridge();
979
984
  const originalWrite = process.stdout.write.bind(process.stdout);
985
+ if (process.stdout.isTTY) {
986
+ originalWrite("\x1B[2J\x1B[H");
987
+ }
980
988
  const activity = new TurnActivityTracker(eventLog);
981
989
  const restoreCapture = startCapture((event) => eventLog.handleEvent(event));
982
990
  const planGraph = new PlanGraphBridge((chunk) => void originalWrite(chunk));
@@ -1049,4 +1057,4 @@ export {
1049
1057
  formatLivenessLabel,
1050
1058
  runTuiApp
1051
1059
  };
1052
- //# sourceMappingURL=tui-app-CJq6YaiP.js.map
1060
+ //# sourceMappingURL=tui-app-CcxiwZyM.js.map