@optiqcode/cli 2.1.4 → 2.1.5

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -328,7 +328,7 @@ async function indexOnce(targetPath, config) {
328
328
  headers: {
329
329
  'Content-Type': 'application/json',
330
330
  },
331
- timeout: 120000, // 2 minute timeout per batch
331
+ timeout: 120000,
332
332
  });
333
333
  if (!response.data.success) {
334
334
  spinner.fail(chalk.red('Indexing failed'));
@@ -336,20 +336,18 @@ async function indexOnce(targetPath, config) {
336
336
  return;
337
337
  }
338
338
  totalChunks += response.data.result?.chunks_created || 0;
339
- break; // Success, exit retry loop
339
+ break;
340
340
  }
341
341
  catch (err) {
342
342
  lastError = err;
343
343
  retries--;
344
- if (DEBUG) {
345
- console.log(chalk.red(`\n[DEBUG] Error: ${err.code || err.message}`));
346
- if (err.response) {
347
- console.log(chalk.red(`[DEBUG] Status: ${err.response.status}`));
348
- }
349
- }
344
+ // Always log which files failed
345
+ console.log(chalk.red(`\n Batch ${batchNum} failed: ${err.code || err.message}`));
346
+ console.log(chalk.yellow(` Files in batch: ${batch.map(f => f.path).join(', ')}`));
347
+ console.log(chalk.gray(` Sizes: ${batch.map(f => `${f.path}(${Math.round(f.content.length / 1024)}KB)`).join(', ')}`));
350
348
  if (retries > 0) {
351
- spinner.text = `Retrying batch ${batchNum}... (${retries} attempts left)`;
352
- await new Promise(r => setTimeout(r, 2000)); // Wait 2s before retry
349
+ console.log(chalk.gray(` Retrying... (${retries} left)`));
350
+ await new Promise(r => setTimeout(r, 2000));
353
351
  }
354
352
  }
355
353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optiqcode/cli",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "CLI tool for Optiq - automatic code indexing and context engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",