repowise 0.1.77 → 0.1.78

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.
@@ -2425,17 +2425,24 @@ async function create() {
2425
2425
  }
2426
2426
  spinner.text = "Resuming existing pipeline...";
2427
2427
  const syncs = await apiRequest(
2428
- `/v1/repos/${repoId}/syncs?limit=1`
2428
+ `/v1/repos/${repoId}/syncs?limit=10`
2429
2429
  );
2430
2430
  const active = syncs.items.find(
2431
2431
  (s) => s.status === "in_progress" || s.status === "awaiting_input"
2432
2432
  );
2433
2433
  if (!active) {
2434
- throw new Error("Could not find active sync to resume. Please try again.");
2434
+ spinner.text = "Retrying...";
2435
+ const endpoint = useFreeRescan ? `/v1/repos/${repoId}/full-rescan` : `/v1/repos/${repoId}/sync`;
2436
+ const retryResult = await apiRequest(endpoint, {
2437
+ method: "POST",
2438
+ body: useFreeRescan ? void 0 : JSON.stringify({ scanType: "full", contextStorage })
2439
+ });
2440
+ syncId = retryResult.syncId;
2441
+ } else {
2442
+ syncId = active.syncId;
2443
+ spinner.info(chalk5.cyan("Resuming existing pipeline..."));
2444
+ spinner.start();
2435
2445
  }
2436
- syncId = active.syncId;
2437
- spinner.info(chalk5.cyan("Resuming existing pipeline..."));
2438
- spinner.start();
2439
2446
  }
2440
2447
  let pollAttempts = 0;
2441
2448
  let pollErrors = 0;
@@ -2865,17 +2872,23 @@ async function sync() {
2865
2872
  }
2866
2873
  spinner.text = "Resuming existing sync...";
2867
2874
  const syncs = await apiRequest(
2868
- `/v1/repos/${repoId}/syncs?limit=1`
2875
+ `/v1/repos/${repoId}/syncs?limit=10`
2869
2876
  );
2870
2877
  const active = syncs.items.find(
2871
2878
  (s) => s.status === "in_progress" || s.status === "awaiting_input"
2872
2879
  );
2873
2880
  if (!active) {
2874
- throw new Error("Could not find active sync to resume. Please try again.");
2881
+ spinner.text = "Retrying...";
2882
+ const retryResult = await apiRequest(`/v1/repos/${repoId}/sync`, {
2883
+ method: "POST",
2884
+ body: JSON.stringify({ scanType: "incremental" })
2885
+ });
2886
+ syncId = retryResult.syncId;
2887
+ } else {
2888
+ syncId = active.syncId;
2889
+ spinner.info(chalk8.cyan("Resuming existing sync..."));
2890
+ spinner.start();
2875
2891
  }
2876
- syncId = active.syncId;
2877
- spinner.info(chalk8.cyan("Resuming existing sync..."));
2878
- spinner.start();
2879
2892
  }
2880
2893
  let pollAttempts = 0;
2881
2894
  const progressRenderer = new ProgressRenderer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowise",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {