groundcrew-cli 0.15.13 → 0.15.14
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 +14 -2
- package/package.json +1 -1
- package/src/index.ts +19 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import fs from "fs/promises";
|
|
5
5
|
import { existsSync } from "fs";
|
|
@@ -603,7 +603,7 @@ async function chat(explicitSession) {
|
|
|
603
603
|
const W = 56;
|
|
604
604
|
const sess = ` Session ${current.id} ${projectName}`;
|
|
605
605
|
const hint = " Type tasks to queue. / for commands.";
|
|
606
|
-
const hint2 = " Shift+Enter = newline.
|
|
606
|
+
const hint2 = " Shift+Enter = newline. Ctrl+C = clear input.";
|
|
607
607
|
const pad = (s, w) => s + " ".repeat(Math.max(0, w - s.length));
|
|
608
608
|
console.log();
|
|
609
609
|
console.log(dim(" \u256D" + "\u2500".repeat(W) + "\u256E"));
|
|
@@ -620,6 +620,18 @@ async function chat(explicitSession) {
|
|
|
620
620
|
console.log(dim(" \u2570" + "\u2500".repeat(W) + "\u256F"));
|
|
621
621
|
console.log();
|
|
622
622
|
let continuationBuffer = [];
|
|
623
|
+
rl.on("SIGINT", () => {
|
|
624
|
+
const line = rl.line;
|
|
625
|
+
if (line || continuationBuffer.length > 0) {
|
|
626
|
+
continuationBuffer = [];
|
|
627
|
+
process.stdout.write("\n");
|
|
628
|
+
prompt();
|
|
629
|
+
} else {
|
|
630
|
+
process.stdout.write("\x1B[?2004l\x1B[<u");
|
|
631
|
+
console.log(dim("\nBye."));
|
|
632
|
+
process.exit(0);
|
|
633
|
+
}
|
|
634
|
+
});
|
|
623
635
|
rl.on("close", () => {
|
|
624
636
|
process.stdout.write("\x1B[?2004l\x1B[<u");
|
|
625
637
|
console.log(dim("\nBye."));
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -808,7 +808,7 @@ async function chat(explicitSession?: string): Promise<void> {
|
|
|
808
808
|
const W = 56;
|
|
809
809
|
const sess = ` Session ${current.id} ${projectName}`;
|
|
810
810
|
const hint = " Type tasks to queue. / for commands.";
|
|
811
|
-
const hint2 = " Shift+Enter = newline.
|
|
811
|
+
const hint2 = " Shift+Enter = newline. Ctrl+C = clear input.";
|
|
812
812
|
const pad = (s: string, w: number) => s + " ".repeat(Math.max(0, w - s.length));
|
|
813
813
|
console.log();
|
|
814
814
|
console.log(dim(" \u256d" + "\u2500".repeat(W) + "\u256e"));
|
|
@@ -827,7 +827,24 @@ async function chat(explicitSession?: string): Promise<void> {
|
|
|
827
827
|
|
|
828
828
|
let continuationBuffer: string[] = [];
|
|
829
829
|
|
|
830
|
-
//
|
|
830
|
+
// Ctrl+C: clear current input (like Claude Code / Copilot CLI)
|
|
831
|
+
// If line has text → clear it and re-prompt
|
|
832
|
+
// If line is empty → exit
|
|
833
|
+
rl.on("SIGINT", () => {
|
|
834
|
+
const line = (rl as any).line as string;
|
|
835
|
+
if (line || continuationBuffer.length > 0) {
|
|
836
|
+
continuationBuffer = [];
|
|
837
|
+
// Clear the current line visually and re-prompt
|
|
838
|
+
process.stdout.write("\n");
|
|
839
|
+
prompt();
|
|
840
|
+
} else {
|
|
841
|
+
process.stdout.write("\x1b[?2004l\x1b[<u");
|
|
842
|
+
console.log(dim("\nBye."));
|
|
843
|
+
process.exit(0);
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
// Handle stream close (pipe EOF, etc.)
|
|
831
848
|
rl.on("close", () => {
|
|
832
849
|
process.stdout.write("\x1b[?2004l\x1b[<u"); // disable bracketed paste + Kitty
|
|
833
850
|
console.log(dim("\nBye."));
|