groundcrew-cli 0.16.1 → 0.16.2

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
@@ -494,8 +494,20 @@ function readMultilineInput(sessionId, projectName, gitCtx) {
494
494
  buf.push(" ".repeat(padWidth) + lines[i]);
495
495
  }
496
496
  }
497
+ let suggestionRows = 0;
498
+ if (lines.length === 1 && lines[0].startsWith("/") && !lines[0].includes(" ")) {
499
+ const partial = lines[0];
500
+ const matches = CHAT_COMMANDS.filter((c) => c.cmd.startsWith(partial));
501
+ if (matches.length > 0 && partial.length >= 1) {
502
+ for (const m of matches) {
503
+ buf.push(`
504
+ ${cyan(m.cmd.padEnd(14))} ${dim(m.desc)}`);
505
+ suggestionRows++;
506
+ }
507
+ }
508
+ }
497
509
  const lastRow = lines.length - 1;
498
- const rowsUp = lastRow - crow;
510
+ const rowsUp = lastRow - crow + suggestionRows;
499
511
  if (rowsUp > 0) buf.push(`\x1B[${rowsUp}A`);
500
512
  buf.push("\r");
501
513
  const col = padWidth + ccol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundcrew-cli",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
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
@@ -626,7 +626,7 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
626
626
  const render = () => {
627
627
  const buf: string[] = [];
628
628
 
629
- // Move to start of input area (includes separator line)
629
+ // Move to start of input area (includes separator line + suggestions)
630
630
  if (lastTermRow > 0) buf.push(`\x1b[${lastTermRow}A`);
631
631
  buf.push("\r\x1b[J"); // col 0 + clear to end of screen
632
632
 
@@ -652,17 +652,31 @@ function readMultilineInput(sessionId: string, projectName: string, gitCtx: { br
652
652
  }
653
653
  }
654
654
 
655
+ // Auto-show slash command suggestions below input
656
+ let suggestionRows = 0;
657
+ if (lines.length === 1 && lines[0].startsWith("/") && !lines[0].includes(" ")) {
658
+ const partial = lines[0];
659
+ const matches = CHAT_COMMANDS.filter(c => c.cmd.startsWith(partial));
660
+ if (matches.length > 0 && partial.length >= 1) {
661
+ for (const m of matches) {
662
+ buf.push(`\n ${cyan(m.cmd.padEnd(14))} ${dim(m.desc)}`);
663
+ suggestionRows++;
664
+ }
665
+ }
666
+ }
667
+
655
668
  // Position cursor at (crow, ccol)
656
669
  const lastRow = lines.length - 1;
657
- const rowsUp = lastRow - crow;
670
+ // Position cursor at (crow, ccol) — move up past remaining input lines + suggestions
671
+ const rowsUp = (lastRow - crow) + suggestionRows;
658
672
  if (rowsUp > 0) buf.push(`\x1b[${rowsUp}A`);
659
673
 
660
674
  buf.push("\r");
661
675
  const col = padWidth + ccol;
662
676
  if (col > 0) buf.push(`\x1b[${col}C`);
663
677
 
664
- // lastTermRow = rows from cursor back to top of separator
665
- // separator is 1 row, then crow rows of input below it
678
+ // lastTermRow = rows above cursor (separator + input lines above crow)
679
+ // Suggestion rows below cursor are cleared by \x1b[J on next render
666
680
  lastTermRow = 1 + crow;
667
681
  process.stdout.write(buf.join(""));
668
682
  };