repowise 0.1.25 → 0.1.27

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.
@@ -715,8 +715,9 @@ var init_progress_renderer = __esm({
715
715
  discoveryShown = false;
716
716
  scanSummaryShown = false;
717
717
  validationShown = false;
718
- lastValidationRound = 0;
719
- shownPersonas = /* @__PURE__ */ new Set();
718
+ lastValidationSnapshot = "";
719
+ lastValidationLineCount = 0;
720
+ pushShown = false;
720
721
  lastFileStatusSnapshot = "";
721
722
  lastFileStatusLineCount = 0;
722
723
  renderPrivacyShield(enabled, spinner) {
@@ -821,27 +822,67 @@ var init_progress_renderer = __esm({
821
822
  if (progress.status === "complete" && !this.validationShown) {
822
823
  this.validationShown = true;
823
824
  spinner.stop();
824
- console.log(chalk4.cyan.bold(" \u2500\u2500 Validation Results \u2500\u2500"));
825
+ if (this.lastValidationLineCount > 0) {
826
+ process.stdout.write(`\x1B[${this.lastValidationLineCount}A`);
827
+ }
828
+ const lines = [];
829
+ lines.push(chalk4.cyan.bold(" \u2500\u2500 Validation Results \u2500\u2500"));
825
830
  for (const result of progress.personaResults) {
826
831
  const scoreColor = result.score === "PASS" ? chalk4.green : result.score === "PARTIAL" ? chalk4.yellow : chalk4.red;
827
- console.log(` ${result.persona}: ${scoreColor(result.score)}`);
832
+ lines.push(` ${result.persona}: ${scoreColor(result.score)}`);
828
833
  }
829
834
  const passCount = progress.personaResults.filter((r) => r.score === "PASS").length;
830
835
  const total = progress.personaResults.length;
831
836
  const roundInfo = progress.round > 1 ? ` (${progress.round} rounds)` : "";
832
- console.log(chalk4.dim(` ${passCount}/${total} PASS${roundInfo}`));
833
- console.log("");
837
+ lines.push(chalk4.dim(` ${passCount}/${total} PASS${roundInfo}`));
838
+ if (passCount < total) {
839
+ lines.push(chalk4.yellow(" \u26A0 Continuing with best-effort context"));
840
+ }
841
+ lines.push("");
842
+ for (const line of lines) {
843
+ process.stdout.write(`\x1B[2K${line}
844
+ `);
845
+ }
846
+ for (let i = lines.length; i < this.lastValidationLineCount; i++) {
847
+ process.stdout.write("\x1B[2K\n");
848
+ }
849
+ this.lastValidationLineCount = 0;
834
850
  spinner.start();
835
851
  return;
836
852
  }
837
- if (progress.round > this.lastValidationRound) {
838
- this.lastValidationRound = progress.round;
839
- }
840
- for (const result of progress.personaResults) {
841
- const key = `${progress.round}:${result.persona}`;
842
- if (!this.shownPersonas.has(key)) {
843
- this.shownPersonas.add(key);
853
+ if (progress.status === "validating" || progress.status === "regenerating") {
854
+ const snapshot = `${progress.round}:${progress.status}:${progress.personaResults.map((r) => `${r.persona}:${r.score}`).join(",")}`;
855
+ if (snapshot === this.lastValidationSnapshot) return;
856
+ this.lastValidationSnapshot = snapshot;
857
+ spinner.stop();
858
+ if (this.lastValidationLineCount > 0) {
859
+ process.stdout.write(`\x1B[${this.lastValidationLineCount}A`);
860
+ }
861
+ const lines = [];
862
+ lines.push(chalk4.cyan.bold(" \u2500\u2500 Validation \u2500\u2500"));
863
+ if (progress.personaResults.length > 0) {
864
+ const passCount = progress.personaResults.filter((r) => r.score === "PASS").length;
865
+ const total = progress.personaResults.length;
866
+ const failCount = total - passCount;
867
+ const statusSuffix = progress.status === "regenerating" ? chalk4.dim(` \u2014 regenerating ${failCount} files`) : "";
868
+ lines.push(
869
+ ` Round ${progress.round}/${progress.maxRounds}: ${passCount}/${total} passed${statusSuffix}`
870
+ );
871
+ for (const result of progress.personaResults) {
872
+ const icon = result.score === "PASS" ? chalk4.green("\u2713") : chalk4.red("\u2717");
873
+ const scoreColor = result.score === "PASS" ? chalk4.green : result.score === "PARTIAL" ? chalk4.yellow : chalk4.red;
874
+ lines.push(` ${icon} ${result.persona}: ${scoreColor(result.score)}`);
875
+ }
876
+ } else {
877
+ lines.push(chalk4.dim(` Round ${progress.round}/${progress.maxRounds}: validating...`));
844
878
  }
879
+ lines.push("");
880
+ for (const line of lines) {
881
+ process.stdout.write(`\x1B[2K${line}
882
+ `);
883
+ }
884
+ this.lastValidationLineCount = lines.length;
885
+ spinner.start();
845
886
  }
846
887
  }
847
888
  renderFileStatuses(fileStatuses, spinner) {
@@ -880,6 +921,16 @@ var init_progress_renderer = __esm({
880
921
  this.lastFileStatusLineCount = lines.length;
881
922
  spinner.start();
882
923
  }
924
+ renderPush(spinner) {
925
+ if (this.pushShown) return;
926
+ this.pushShown = true;
927
+ spinner.stop();
928
+ console.log("");
929
+ console.log(chalk4.cyan.bold(" \u2500\u2500 Pushing to Repository \u2500\u2500"));
930
+ console.log(` ${chalk4.dim("Committing context files to your repository...")}`);
931
+ console.log("");
932
+ spinner.start();
933
+ }
883
934
  getSpinnerText(syncResult) {
884
935
  const stepLabel = syncResult.stepLabel ?? syncResult.currentStep ?? "Processing";
885
936
  const overallPct = computeOverallProgress(syncResult);
@@ -928,6 +979,9 @@ var init_progress_renderer = __esm({
928
979
  if (syncResult.validationProgress) {
929
980
  this.renderValidation(syncResult.validationProgress, spinner);
930
981
  }
982
+ if (syncResult.currentStep === "push-context") {
983
+ this.renderPush(spinner);
984
+ }
931
985
  spinner.text = this.getSpinnerText(syncResult);
932
986
  }
933
987
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowise",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {