groundcrew-cli 0.15.6 → 0.15.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.
package/dist/index.js CHANGED
@@ -456,22 +456,22 @@ function setupInlineSuggestions(rl) {
456
456
  }
457
457
  dropdownLines = count;
458
458
  buf.push(`\x1B[${count}A`);
459
- buf.push(`\r`);
459
+ const prompt = rl._prompt || "";
460
+ const inputLine = rl.line || "";
461
+ buf.push(`\r${prompt}${inputLine}`);
460
462
  }
461
463
  process.stdout.write(buf.join(""));
462
- if (dropdownLines > 0) {
463
- rl._refreshLine();
464
- if (remainder) {
465
- process.stdout.write(`\x1B[K\x1B[2m${remainder}\x1B[0m\x1B[${remainder.length}D`);
466
- }
464
+ if (dropdownLines > 0 && remainder) {
465
+ process.stdout.write(`\x1B[K\x1B[2m${remainder}\x1B[0m\x1B[${remainder.length}D`);
467
466
  }
468
467
  };
469
468
  process.stdin.on("keypress", (_ch, key) => {
470
469
  if (!key) return;
471
- if (key.name === "return" && key.shift) {
470
+ if (key.ctrl && key.name === "j") {
472
471
  const line = rl.line;
473
472
  rl.line = line + "\\";
474
473
  rl.cursor = rl.line.length;
474
+ rl._line();
475
475
  return;
476
476
  }
477
477
  clearGhost();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundcrew-cli",
3
- "version": "0.15.6",
3
+ "version": "0.15.8",
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
@@ -604,34 +604,31 @@ function setupInlineSuggestions(rl: readline.Interface): void {
604
604
  }
605
605
  dropdownLines = count;
606
606
 
607
- // Back to prompt line and restore horizontal position
608
- // Move up to prompt line
607
+ // Move back up to prompt line
609
608
  buf.push(`\x1b[${count}A`);
610
- // Move to column 1, then rewrite prompt+line to position cursor correctly
611
- buf.push(`\r`);
612
- // Let readline handle cursor positioning
609
+ // Redraw prompt line manually (NOT _refreshLine it clears screen below)
610
+ const prompt = (rl as any)._prompt || "";
611
+ const inputLine = (rl as any).line || "";
612
+ buf.push(`\r${prompt}${inputLine}`);
613
613
  }
614
614
 
615
615
  process.stdout.write(buf.join(""));
616
- // After dropdown, force readline to redraw prompt line to fix cursor position
617
- if (dropdownLines > 0) {
618
- (rl as any)._refreshLine();
619
- // Re-draw inline ghost since _refreshLine cleared it
620
- if (remainder) {
621
- process.stdout.write(`\x1b[K\x1b[2m${remainder}\x1b[0m\x1b[${remainder.length}D`);
622
- }
616
+ // Re-draw inline ghost after prompt redraw (for dropdown case)
617
+ if (dropdownLines > 0 && remainder) {
618
+ process.stdout.write(`\x1b[K\x1b[2m${remainder}\x1b[0m\x1b[${remainder.length}D`);
623
619
  }
624
620
  };
625
621
 
626
622
  process.stdin.on("keypress", (_ch: string, key: any) => {
627
623
  if (!key) return;
628
624
 
629
- // Shift+Enter: insert newline marker instead of submitting
630
- if (key.name === "return" && key.shift) {
631
- // Append backslash to trigger line continuation, then simulate Enter
625
+ // Ctrl+J: insert line continuation (Shift+Enter not detectable in most terminals)
626
+ if (key.ctrl && key.name === "j") {
632
627
  const line = (rl as any).line as string;
633
628
  (rl as any).line = line + "\\";
634
629
  (rl as any).cursor = (rl as any).line.length;
630
+ // Simulate Enter to trigger continuation prompt
631
+ (rl as any)._line();
635
632
  return;
636
633
  }
637
634