repowisestage 0.0.27 → 0.0.29

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.
@@ -2527,10 +2527,46 @@ function detectRepoName(repoRoot) {
2527
2527
  }
2528
2528
 
2529
2529
  // src/lib/interview-handler.ts
2530
+ import { createInterface } from "readline";
2530
2531
  import chalk3 from "chalk";
2531
- import { input } from "@inquirer/prompts";
2532
2532
  var INTERVIEW_TIMEOUT_MS = 5 * 60 * 1e3;
2533
2533
  var MAX_QUESTIONS = 10;
2534
+ function multilineInput() {
2535
+ return new Promise((resolve, reject) => {
2536
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
2537
+ const lines = [];
2538
+ let lastLineEmpty = false;
2539
+ rl.setPrompt(" > ");
2540
+ rl.prompt();
2541
+ rl.on("line", (line) => {
2542
+ if (line === "" && lines.length === 0) {
2543
+ rl.close();
2544
+ resolve("");
2545
+ return;
2546
+ }
2547
+ if (line === "" && lastLineEmpty) {
2548
+ if (lines.length > 0 && lines[lines.length - 1] === "") {
2549
+ lines.pop();
2550
+ }
2551
+ rl.close();
2552
+ resolve(lines.join("\n").trim());
2553
+ return;
2554
+ }
2555
+ lastLineEmpty = line === "";
2556
+ lines.push(line);
2557
+ rl.setPrompt(" > ");
2558
+ rl.prompt();
2559
+ });
2560
+ rl.on("close", () => {
2561
+ if (lines.length > 0) {
2562
+ resolve(lines.join("\n").trim());
2563
+ } else {
2564
+ resolve("");
2565
+ }
2566
+ });
2567
+ rl.on("error", reject);
2568
+ });
2569
+ }
2534
2570
  var questionCounter = 0;
2535
2571
  async function handleInterview(syncId, questionId, questionText, questionContext, estimatedQuestions) {
2536
2572
  questionCounter++;
@@ -2551,14 +2587,11 @@ async function handleInterview(syncId, questionId, questionText, questionContext
2551
2587
  console.log(chalk3.dim(` ${questionContext}`));
2552
2588
  }
2553
2589
  console.log(` ${questionText}`);
2554
- console.log(chalk3.dim(' (Enter to skip \xB7 "done" to finish early)'));
2590
+ console.log(chalk3.dim(' (Two empty lines to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
2555
2591
  let answer;
2556
2592
  try {
2557
2593
  answer = await Promise.race([
2558
- input({
2559
- message: chalk3.cyan(">"),
2560
- theme: { prefix: " " }
2561
- }),
2594
+ multilineInput(),
2562
2595
  new Promise(
2563
2596
  (_, reject) => setTimeout(() => reject(new Error("INTERVIEW_TIMEOUT")), INTERVIEW_TIMEOUT_MS)
2564
2597
  )
@@ -2749,6 +2782,11 @@ var ProgressRenderer = class {
2749
2782
  spinner.stop();
2750
2783
  console.log("");
2751
2784
  console.log(chalk4.cyan.bold(" \u2500\u2500 Code Analysis \u2500\u2500"));
2785
+ console.log(
2786
+ chalk4.cyan(
2787
+ " \u2615 This takes a few minutes \u2014 grab a coffee, we'll handle the rest!"
2788
+ )
2789
+ );
2752
2790
  console.log(chalk4.dim(" Analyzing your codebase structure, functions, and relationships."));
2753
2791
  spinner.start();
2754
2792
  }
@@ -2768,11 +2806,6 @@ var ProgressRenderer = class {
2768
2806
  this.generationHeaderShown = true;
2769
2807
  spinner.stop();
2770
2808
  console.log(chalk4.cyan.bold(" \u2500\u2500 Context Generation \u2500\u2500"));
2771
- console.log(
2772
- chalk4.cyan(
2773
- " \u2615 This takes a few minutes \u2014 grab a coffee, we'll handle the rest!"
2774
- )
2775
- );
2776
2809
  console.log("");
2777
2810
  spinner.start();
2778
2811
  }
@@ -2875,7 +2908,7 @@ var ProgressRenderer = class {
2875
2908
  getSpinnerText(syncResult) {
2876
2909
  const overallPct = computeOverallProgress(syncResult);
2877
2910
  const stepLabel = syncResult.stepLabel ?? syncResult.currentStep ?? "Processing";
2878
- if (syncResult.scanProgress && !syncResult.scanProgress.summary) {
2911
+ if (syncResult.scanProgress && !syncResult.scanProgress.summary && syncResult.currentStep === "scan-and-generate") {
2879
2912
  const sp = syncResult.scanProgress;
2880
2913
  const pct = sp.totalBatches > 0 ? Math.round(sp.currentBatch / sp.totalBatches * 100) : 0;
2881
2914
  return `Scanning batch ${sp.currentBatch}/${sp.totalBatches} ${chalk4.dim(`(${pct}%)`)}`;
@@ -4037,8 +4070,8 @@ async function config() {
4037
4070
  }
4038
4071
  patch.deliveryMode = newMode;
4039
4072
  } else if (setting === "monitoredBranch") {
4040
- const { input: input2 } = await import("@inquirer/prompts");
4041
- const newBranch = await input2({
4073
+ const { input } = await import("@inquirer/prompts");
4074
+ const newBranch = await input({
4042
4075
  message: "Monitored branch",
4043
4076
  default: currentBranch
4044
4077
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowisestage",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {