groundcrew-cli 0.16.5 → 0.16.6

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
@@ -500,6 +500,7 @@ function readMultilineInput(sessionId, projectName, gitCtx, sessionDir) {
500
500
  let crow = 0;
501
501
  let ccol = 0;
502
502
  const padWidth = sessionId.length + 5;
503
+ const linePad = (i) => i === 0 ? padWidth : 0;
503
504
  let lastTermRow = 0;
504
505
  let pasteBuffer = "";
505
506
  let isPasting = false;
@@ -523,7 +524,7 @@ function readMultilineInput(sessionId, projectName, gitCtx, sessionDir) {
523
524
  if (i === 0) {
524
525
  buf.push(dim(`[${sessionId}]`) + " " + bold(">") + " " + lines[i]);
525
526
  } else {
526
- buf.push(" ".repeat(padWidth) + lines[i]);
527
+ buf.push(lines[i]);
527
528
  }
528
529
  }
529
530
  let suggestionRows = 0;
@@ -540,17 +541,18 @@ function readMultilineInput(sessionId, projectName, gitCtx, sessionDir) {
540
541
  }
541
542
  const lastRow = lines.length - 1;
542
543
  const termRowsForLine = (i) => {
543
- const lineLen = (i === 0 ? padWidth : padWidth) + lines[i].length;
544
+ const lineLen = linePad(i) + lines[i].length;
544
545
  return lineLen === 0 ? 1 : Math.max(1, Math.ceil(lineLen / termW));
545
546
  };
546
547
  let rowsBelowCursor = suggestionRows;
547
548
  for (let i = lastRow; i > crow; i--) rowsBelowCursor += termRowsForLine(i);
548
549
  const cursorLineTermRows = termRowsForLine(crow);
549
- const cursorRowWithinLine = Math.floor((padWidth + ccol) / termW);
550
+ const cursorPad = linePad(crow);
551
+ const cursorRowWithinLine = Math.floor((cursorPad + ccol) / termW);
550
552
  rowsBelowCursor += cursorLineTermRows - 1 - cursorRowWithinLine;
551
553
  if (rowsBelowCursor > 0) buf.push(`\x1B[${rowsBelowCursor}A`);
552
554
  buf.push("\r");
553
- const col = (padWidth + ccol) % termW;
555
+ const col = (cursorPad + ccol) % termW;
554
556
  if (col > 0) buf.push(`\x1B[${col}C`);
555
557
  let rowsAbove = 1;
556
558
  for (let i = 0; i < crow; i++) rowsAbove += termRowsForLine(i);
@@ -572,7 +574,7 @@ function readMultilineInput(sessionId, projectName, gitCtx, sessionDir) {
572
574
  if (i === 0) {
573
575
  buf.push(dim(`[${sessionId}]`) + " " + bold(">") + " " + lines[i]);
574
576
  } else {
575
- buf.push(" ".repeat(padWidth) + lines[i]);
577
+ buf.push(lines[i]);
576
578
  }
577
579
  }
578
580
  buf.push("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundcrew-cli",
3
- "version": "0.16.5",
3
+ "version": "0.16.6",
4
4
  "description": "CLI companion for Groundcrew — queue tasks, send feedback, monitor your Copilot agent from another terminal.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -647,6 +647,7 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
647
647
 
648
648
  // Visible width of prompt: "[sessionId] > "
649
649
  const padWidth = sessionId.length + 5; // [ + id + ] + space + > + space = len+5
650
+ const linePad = (i: number) => i === 0 ? padWidth : 0;
650
651
 
651
652
  // Track how many rows up from cursor to top of rendered area (including separator)
652
653
  let lastTermRow = 0;
@@ -680,7 +681,7 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
680
681
  if (i === 0) {
681
682
  buf.push(dim(`[${sessionId}]`) + " " + bold(">") + " " + lines[i]);
682
683
  } else {
683
- buf.push(" ".repeat(padWidth) + lines[i]);
684
+ buf.push(lines[i]);
684
685
  }
685
686
  }
686
687
 
@@ -702,7 +703,7 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
702
703
 
703
704
  // Calculate actual terminal rows each line occupies (for wrapped lines)
704
705
  const termRowsForLine = (i: number): number => {
705
- const lineLen = (i === 0 ? padWidth : padWidth) + lines[i].length;
706
+ const lineLen = linePad(i) + lines[i].length;
706
707
  return lineLen === 0 ? 1 : Math.max(1, Math.ceil(lineLen / termW));
707
708
  };
708
709
 
@@ -712,13 +713,14 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
712
713
  for (let i = lastRow; i > crow; i--) rowsBelowCursor += termRowsForLine(i);
713
714
  // Add any extra wrapped rows on the cursor line itself (below the cursor's row within wraps)
714
715
  const cursorLineTermRows = termRowsForLine(crow);
715
- const cursorRowWithinLine = Math.floor((padWidth + ccol) / termW);
716
+ const cursorPad = linePad(crow);
717
+ const cursorRowWithinLine = Math.floor((cursorPad + ccol) / termW);
716
718
  rowsBelowCursor += (cursorLineTermRows - 1 - cursorRowWithinLine);
717
719
 
718
720
  if (rowsBelowCursor > 0) buf.push(`\x1b[${rowsBelowCursor}A`);
719
721
 
720
722
  buf.push("\r");
721
- const col = (padWidth + ccol) % termW;
723
+ const col = (cursorPad + ccol) % termW;
722
724
  if (col > 0) buf.push(`\x1b[${col}C`);
723
725
 
724
726
  // lastTermRow = terminal rows above cursor (separator + wrapped input lines above crow + cursor's wrapped rows above)
@@ -747,7 +749,7 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
747
749
  if (i === 0) {
748
750
  buf.push(dim(`[${sessionId}]`) + " " + bold(">") + " " + lines[i]);
749
751
  } else {
750
- buf.push(" ".repeat(padWidth) + lines[i]);
752
+ buf.push(lines[i]);
751
753
  }
752
754
  }
753
755
  buf.push("\n");