repowisestage 0.0.28 → 0.0.30

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.
@@ -2535,24 +2535,36 @@ function multilineInput() {
2535
2535
  return new Promise((resolve, reject) => {
2536
2536
  const rl = createInterface({ input: process.stdin, output: process.stdout });
2537
2537
  const lines = [];
2538
+ let lastLineTime = 0;
2538
2539
  rl.setPrompt(" > ");
2539
2540
  rl.prompt();
2540
2541
  rl.on("line", (line) => {
2541
- if (line === "" && lines.length > 0) {
2542
- rl.close();
2543
- resolve(lines.join("\n"));
2544
- } else if (line === "" && lines.length === 0) {
2545
- rl.close();
2546
- resolve("");
2547
- } else {
2542
+ const now = Date.now();
2543
+ const elapsed = now - lastLineTime;
2544
+ lastLineTime = now;
2545
+ if (lines.length === 0) {
2546
+ if (line === "") {
2547
+ rl.close();
2548
+ resolve("");
2549
+ return;
2550
+ }
2548
2551
  lines.push(line);
2549
2552
  rl.setPrompt(" > ");
2550
2553
  rl.prompt();
2554
+ return;
2555
+ }
2556
+ if (elapsed > 50 && line === "") {
2557
+ rl.close();
2558
+ resolve(lines.join("\n").trim());
2559
+ return;
2551
2560
  }
2561
+ lines.push(line);
2562
+ rl.setPrompt(" > ");
2563
+ rl.prompt();
2552
2564
  });
2553
2565
  rl.on("close", () => {
2554
2566
  if (lines.length > 0) {
2555
- resolve(lines.join("\n"));
2567
+ resolve(lines.join("\n").trim());
2556
2568
  } else {
2557
2569
  resolve("");
2558
2570
  }
@@ -2580,7 +2592,7 @@ async function handleInterview(syncId, questionId, questionText, questionContext
2580
2592
  console.log(chalk3.dim(` ${questionContext}`));
2581
2593
  }
2582
2594
  console.log(` ${questionText}`);
2583
- console.log(chalk3.dim(' (Empty line to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
2595
+ console.log(chalk3.dim(' (Enter to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
2584
2596
  let answer;
2585
2597
  try {
2586
2598
  answer = await Promise.race([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowisestage",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {