@lazyingart/agintiflow 0.20.0 → 0.20.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "type": "module",
5
5
  "description": "AgInTiFlow is a web-first coding agent and CLI with DeepSeek routing, sandboxed tools, model providers, canvas artifacts, and optional wrappers.",
6
6
  "license": "Apache-2.0",
@@ -124,6 +124,17 @@ try {
124
124
  if (promptLayout.cursorRow < 0 || promptLayout.cursorColumn < 0) {
125
125
  throw new Error("terminal prompt layout returned an invalid cursor location");
126
126
  }
127
+ const paddedPromptLayout = buildPromptLayout("hello", 5, 80, 24, { commandCwd: "/tmp/aginti-project" });
128
+ const paddedRows = paddedPromptLayout.renderedRows.map((line) => line.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, ""));
129
+ if (
130
+ paddedPromptLayout.cursorRow !== 1 ||
131
+ paddedRows[0].trim() !== "" ||
132
+ !paddedRows[1].includes("user> hello") ||
133
+ paddedRows[2].trim() !== "" ||
134
+ !paddedRows[3].includes("cwd /tmp/aginti-project")
135
+ ) {
136
+ throw new Error("terminal prompt layout did not render visual-only input padding safely");
137
+ }
127
138
  const hugePromptLayout = buildPromptLayout(Array.from({ length: 30 }, (_unused, index) => `line ${index + 1}`).join("\n"), 120, 80, 20);
128
139
  if (hugePromptLayout.renderedRows.length > 12 || !hugePromptLayout.renderedRows.some((line) => line.includes("earlier input row"))) {
129
140
  throw new Error("terminal prompt layout did not bound redraw size for large prompts");
@@ -749,6 +749,7 @@ export function buildPromptLayout(buffer = "", cursor = 0, width = terminalWidth
749
749
  const visible = promptVisibleWindow(rows, cursorRow, height);
750
750
  const renderedRows = [];
751
751
  let renderedCursorRow = cursorRow - visible.start;
752
+ const useInputPadding = options.inputPadding !== false && height >= 10;
752
753
 
753
754
  if (options.statusLine) {
754
755
  renderedRows.push(panelLine(`${labelText("run", { prompt: true })}${compactLine(options.statusLine, lineWidth - 10)}`, ansi.statusBg, lineWidth));
@@ -771,11 +772,20 @@ export function buildPromptLayout(buffer = "", cursor = 0, width = terminalWidth
771
772
  renderedCursorRow += 1;
772
773
  }
773
774
 
775
+ if (useInputPadding) {
776
+ renderedRows.push(panelLine("", ansi.userBg, lineWidth));
777
+ renderedCursorRow += 1;
778
+ }
779
+
774
780
  for (const row of rows.slice(visible.start, visible.end)) {
775
781
  const content = safeBuffer ? `${row.prefix}${row.text}` : `${row.prefix}${emptyHint}`;
776
782
  renderedRows.push(panelLine(content, ansi.userBg, lineWidth));
777
783
  }
778
784
 
785
+ if (useInputPadding) {
786
+ renderedRows.push(panelLine("", ansi.userBg, lineWidth));
787
+ }
788
+
779
789
  if (visible.bottomHidden > 0) {
780
790
  renderedRows.push(panelLine(` ... ${visible.bottomHidden} later input row${visible.bottomHidden === 1 ? "" : "s"}`, ansi.systemBg, lineWidth));
781
791
  }