repowisestage 0.0.27 → 0.0.28

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,39 @@ 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
+ rl.setPrompt(" > ");
2539
+ rl.prompt();
2540
+ 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 {
2548
+ lines.push(line);
2549
+ rl.setPrompt(" > ");
2550
+ rl.prompt();
2551
+ }
2552
+ });
2553
+ rl.on("close", () => {
2554
+ if (lines.length > 0) {
2555
+ resolve(lines.join("\n"));
2556
+ } else {
2557
+ resolve("");
2558
+ }
2559
+ });
2560
+ rl.on("error", reject);
2561
+ });
2562
+ }
2534
2563
  var questionCounter = 0;
2535
2564
  async function handleInterview(syncId, questionId, questionText, questionContext, estimatedQuestions) {
2536
2565
  questionCounter++;
@@ -2551,14 +2580,11 @@ async function handleInterview(syncId, questionId, questionText, questionContext
2551
2580
  console.log(chalk3.dim(` ${questionContext}`));
2552
2581
  }
2553
2582
  console.log(` ${questionText}`);
2554
- console.log(chalk3.dim(' (Enter to skip \xB7 "done" to finish early)'));
2583
+ console.log(chalk3.dim(' (Empty line to submit \xB7 Enter to skip \xB7 "done" to finish early)'));
2555
2584
  let answer;
2556
2585
  try {
2557
2586
  answer = await Promise.race([
2558
- input({
2559
- message: chalk3.cyan(">"),
2560
- theme: { prefix: " " }
2561
- }),
2587
+ multilineInput(),
2562
2588
  new Promise(
2563
2589
  (_, reject) => setTimeout(() => reject(new Error("INTERVIEW_TIMEOUT")), INTERVIEW_TIMEOUT_MS)
2564
2590
  )
@@ -2749,6 +2775,11 @@ var ProgressRenderer = class {
2749
2775
  spinner.stop();
2750
2776
  console.log("");
2751
2777
  console.log(chalk4.cyan.bold(" \u2500\u2500 Code Analysis \u2500\u2500"));
2778
+ console.log(
2779
+ chalk4.cyan(
2780
+ " \u2615 This takes a few minutes \u2014 grab a coffee, we'll handle the rest!"
2781
+ )
2782
+ );
2752
2783
  console.log(chalk4.dim(" Analyzing your codebase structure, functions, and relationships."));
2753
2784
  spinner.start();
2754
2785
  }
@@ -2768,11 +2799,6 @@ var ProgressRenderer = class {
2768
2799
  this.generationHeaderShown = true;
2769
2800
  spinner.stop();
2770
2801
  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
2802
  console.log("");
2777
2803
  spinner.start();
2778
2804
  }
@@ -2875,7 +2901,7 @@ var ProgressRenderer = class {
2875
2901
  getSpinnerText(syncResult) {
2876
2902
  const overallPct = computeOverallProgress(syncResult);
2877
2903
  const stepLabel = syncResult.stepLabel ?? syncResult.currentStep ?? "Processing";
2878
- if (syncResult.scanProgress && !syncResult.scanProgress.summary) {
2904
+ if (syncResult.scanProgress && !syncResult.scanProgress.summary && syncResult.currentStep === "scan-and-generate") {
2879
2905
  const sp = syncResult.scanProgress;
2880
2906
  const pct = sp.totalBatches > 0 ? Math.round(sp.currentBatch / sp.totalBatches * 100) : 0;
2881
2907
  return `Scanning batch ${sp.currentBatch}/${sp.totalBatches} ${chalk4.dim(`(${pct}%)`)}`;
@@ -4037,8 +4063,8 @@ async function config() {
4037
4063
  }
4038
4064
  patch.deliveryMode = newMode;
4039
4065
  } else if (setting === "monitoredBranch") {
4040
- const { input: input2 } = await import("@inquirer/prompts");
4041
- const newBranch = await input2({
4066
+ const { input } = await import("@inquirer/prompts");
4067
+ const newBranch = await input({
4042
4068
  message: "Monitored branch",
4043
4069
  default: currentBranch
4044
4070
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowisestage",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {