@optiqcode/cli 2.1.4 → 2.1.6
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/index.js +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ async function showBanner() {
|
|
|
32
32
|
|_| |_|
|
|
33
33
|
`));
|
|
34
34
|
console.log(chalk.gray(' AI-powered code indexing & search'));
|
|
35
|
-
console.log(chalk.gray(' v2.
|
|
35
|
+
console.log(chalk.gray(' v2.1.6\n'));
|
|
36
36
|
}
|
|
37
37
|
function showHelp() {
|
|
38
38
|
console.log(chalk.cyan.bold('Optiq CLI') + chalk.gray(' - AI-powered code indexing\n'));
|
|
@@ -328,7 +328,7 @@ async function indexOnce(targetPath, config) {
|
|
|
328
328
|
headers: {
|
|
329
329
|
'Content-Type': 'application/json',
|
|
330
330
|
},
|
|
331
|
-
timeout: 120000,
|
|
331
|
+
timeout: 120000,
|
|
332
332
|
});
|
|
333
333
|
if (!response.data.success) {
|
|
334
334
|
spinner.fail(chalk.red('Indexing failed'));
|
|
@@ -336,20 +336,20 @@ async function indexOnce(targetPath, config) {
|
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
totalChunks += response.data.result?.chunks_created || 0;
|
|
339
|
-
break;
|
|
339
|
+
break;
|
|
340
340
|
}
|
|
341
341
|
catch (err) {
|
|
342
342
|
lastError = err;
|
|
343
343
|
retries--;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
344
|
+
// Stop spinner to show error clearly
|
|
345
|
+
spinner.stop();
|
|
346
|
+
console.log(chalk.red(`\n✗ Batch ${batchNum} failed: ${err.code || err.message}`));
|
|
347
|
+
console.log(chalk.yellow(` Files: ${batch.map(f => f.path).join(', ')}`));
|
|
348
|
+
console.log(chalk.gray(` Sizes: ${batch.map(f => `${f.path}(${Math.round(f.content.length / 1024)}KB)`).join(', ')}`));
|
|
350
349
|
if (retries > 0) {
|
|
351
|
-
|
|
352
|
-
await new Promise(r => setTimeout(r, 2000));
|
|
350
|
+
console.log(chalk.gray(` Retrying... (${retries} left)\n`));
|
|
351
|
+
await new Promise(r => setTimeout(r, 2000));
|
|
352
|
+
spinner.start(`Retrying batch ${batchNum}...`);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
}
|