repowise 0.1.77 → 0.1.79
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/bin/repowise.js +54 -23
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -2186,15 +2186,33 @@ var ProgressRenderer = class {
|
|
|
2186
2186
|
const lines = [];
|
|
2187
2187
|
lines.push(chalk4.dim(` Generated ${completedCount}/${totalCount} files`));
|
|
2188
2188
|
lines.push("");
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2189
|
+
const coreCompleted = coreFiles.filter((f) => f.status === "completed").length;
|
|
2190
|
+
const coreGenerating = coreFiles.filter((f) => f.status === "generating");
|
|
2191
|
+
if (coreCompleted === coreFiles.length) {
|
|
2192
|
+
lines.push(
|
|
2193
|
+
` ${chalk4.bold("Core")} ${chalk4.green("\u2713")} ${coreCompleted}/${coreFiles.length} completed`
|
|
2194
|
+
);
|
|
2195
|
+
} else {
|
|
2196
|
+
lines.push(` ${chalk4.bold("Core")} (${coreCompleted}/${coreFiles.length} completed)`);
|
|
2197
|
+
for (const file of coreGenerating) {
|
|
2198
|
+
lines.push(formatFileLine(file, maxCoreLen));
|
|
2199
|
+
}
|
|
2192
2200
|
}
|
|
2193
2201
|
if (tailoredFiles.length > 0) {
|
|
2202
|
+
const tailoredCompleted = tailoredFiles.filter((f) => f.status === "completed").length;
|
|
2203
|
+
const tailoredGenerating = tailoredFiles.filter((f) => f.status === "generating");
|
|
2194
2204
|
lines.push("");
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2205
|
+
if (tailoredCompleted === tailoredFiles.length) {
|
|
2206
|
+
lines.push(
|
|
2207
|
+
` ${chalk4.bold("Tailored")} ${chalk4.green("\u2713")} ${tailoredCompleted}/${tailoredFiles.length} completed`
|
|
2208
|
+
);
|
|
2209
|
+
} else {
|
|
2210
|
+
lines.push(
|
|
2211
|
+
` ${chalk4.bold("Tailored")} (${tailoredCompleted}/${tailoredFiles.length} completed)`
|
|
2212
|
+
);
|
|
2213
|
+
for (const file of tailoredGenerating) {
|
|
2214
|
+
lines.push(formatFileLine(file, maxTailoredLen));
|
|
2215
|
+
}
|
|
2198
2216
|
}
|
|
2199
2217
|
}
|
|
2200
2218
|
lines.push("");
|
|
@@ -2224,6 +2242,13 @@ var ProgressRenderer = class {
|
|
|
2224
2242
|
let progressText = stepLabel;
|
|
2225
2243
|
if (syncResult.scanProgress && !syncResult.scanProgress.summary) {
|
|
2226
2244
|
progressText = `Scanning batch ${syncResult.scanProgress.currentBatch}/${syncResult.scanProgress.totalBatches}`;
|
|
2245
|
+
} else if (syncResult.validationProgress && syncResult.validationProgress.status !== "complete") {
|
|
2246
|
+
const vp = syncResult.validationProgress;
|
|
2247
|
+
if (vp.status === "regenerating") {
|
|
2248
|
+
progressText = `Improving files based on feedback (round ${vp.round})`;
|
|
2249
|
+
} else {
|
|
2250
|
+
progressText = `Validation round ${vp.round}/${vp.maxRounds}`;
|
|
2251
|
+
}
|
|
2227
2252
|
} else if (syncResult.generationProgress) {
|
|
2228
2253
|
const gp = syncResult.generationProgress;
|
|
2229
2254
|
if (gp.fileStatuses && gp.fileStatuses.length > 0) {
|
|
@@ -2240,13 +2265,6 @@ var ProgressRenderer = class {
|
|
|
2240
2265
|
} else {
|
|
2241
2266
|
progressText = `Generating ${gp.currentFileName} (${gp.currentFile}/${gp.totalFiles})`;
|
|
2242
2267
|
}
|
|
2243
|
-
} else if (syncResult.validationProgress && syncResult.validationProgress.status !== "complete") {
|
|
2244
|
-
const vp = syncResult.validationProgress;
|
|
2245
|
-
if (vp.status === "regenerating") {
|
|
2246
|
-
progressText = `Improving files based on feedback (round ${vp.round})`;
|
|
2247
|
-
} else {
|
|
2248
|
-
progressText = `Validation round ${vp.round}/${vp.maxRounds}`;
|
|
2249
|
-
}
|
|
2250
2268
|
}
|
|
2251
2269
|
return `${progressText}... ${chalk4.dim(`(${overallPct}%)`)}`;
|
|
2252
2270
|
}
|
|
@@ -2425,17 +2443,24 @@ async function create() {
|
|
|
2425
2443
|
}
|
|
2426
2444
|
spinner.text = "Resuming existing pipeline...";
|
|
2427
2445
|
const syncs = await apiRequest(
|
|
2428
|
-
`/v1/repos/${repoId}/syncs?limit=
|
|
2446
|
+
`/v1/repos/${repoId}/syncs?limit=10`
|
|
2429
2447
|
);
|
|
2430
2448
|
const active = syncs.items.find(
|
|
2431
2449
|
(s) => s.status === "in_progress" || s.status === "awaiting_input"
|
|
2432
2450
|
);
|
|
2433
2451
|
if (!active) {
|
|
2434
|
-
|
|
2452
|
+
spinner.text = "Retrying...";
|
|
2453
|
+
const endpoint = useFreeRescan ? `/v1/repos/${repoId}/full-rescan` : `/v1/repos/${repoId}/sync`;
|
|
2454
|
+
const retryResult = await apiRequest(endpoint, {
|
|
2455
|
+
method: "POST",
|
|
2456
|
+
body: useFreeRescan ? void 0 : JSON.stringify({ scanType: "full", contextStorage })
|
|
2457
|
+
});
|
|
2458
|
+
syncId = retryResult.syncId;
|
|
2459
|
+
} else {
|
|
2460
|
+
syncId = active.syncId;
|
|
2461
|
+
spinner.info(chalk5.cyan("Resuming existing pipeline..."));
|
|
2462
|
+
spinner.start();
|
|
2435
2463
|
}
|
|
2436
|
-
syncId = active.syncId;
|
|
2437
|
-
spinner.info(chalk5.cyan("Resuming existing pipeline..."));
|
|
2438
|
-
spinner.start();
|
|
2439
2464
|
}
|
|
2440
2465
|
let pollAttempts = 0;
|
|
2441
2466
|
let pollErrors = 0;
|
|
@@ -2865,17 +2890,23 @@ async function sync() {
|
|
|
2865
2890
|
}
|
|
2866
2891
|
spinner.text = "Resuming existing sync...";
|
|
2867
2892
|
const syncs = await apiRequest(
|
|
2868
|
-
`/v1/repos/${repoId}/syncs?limit=
|
|
2893
|
+
`/v1/repos/${repoId}/syncs?limit=10`
|
|
2869
2894
|
);
|
|
2870
2895
|
const active = syncs.items.find(
|
|
2871
2896
|
(s) => s.status === "in_progress" || s.status === "awaiting_input"
|
|
2872
2897
|
);
|
|
2873
2898
|
if (!active) {
|
|
2874
|
-
|
|
2899
|
+
spinner.text = "Retrying...";
|
|
2900
|
+
const retryResult = await apiRequest(`/v1/repos/${repoId}/sync`, {
|
|
2901
|
+
method: "POST",
|
|
2902
|
+
body: JSON.stringify({ scanType: "incremental" })
|
|
2903
|
+
});
|
|
2904
|
+
syncId = retryResult.syncId;
|
|
2905
|
+
} else {
|
|
2906
|
+
syncId = active.syncId;
|
|
2907
|
+
spinner.info(chalk8.cyan("Resuming existing sync..."));
|
|
2908
|
+
spinner.start();
|
|
2875
2909
|
}
|
|
2876
|
-
syncId = active.syncId;
|
|
2877
|
-
spinner.info(chalk8.cyan("Resuming existing sync..."));
|
|
2878
|
-
spinner.start();
|
|
2879
2910
|
}
|
|
2880
2911
|
let pollAttempts = 0;
|
|
2881
2912
|
const progressRenderer = new ProgressRenderer();
|