@optiqcode/cli 2.1.7 → 2.5.0
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/commands/index.js +2 -2
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/commands/index.js
CHANGED
|
@@ -74,8 +74,8 @@ export async function index(options) {
|
|
|
74
74
|
spinner.text = 'Indexing with Optiq Engine...';
|
|
75
75
|
// Generate repository ID from path
|
|
76
76
|
const repoId = generateRepoId(targetPath);
|
|
77
|
-
// Batch upload files (
|
|
78
|
-
const BATCH_SIZE =
|
|
77
|
+
// Batch upload files (20 at a time to avoid gateway timeouts)
|
|
78
|
+
const BATCH_SIZE = 20;
|
|
79
79
|
let uploadedCount = 0;
|
|
80
80
|
let totalChunksCreated = 0;
|
|
81
81
|
for (let i = 0; i < fileContents.length; i += BATCH_SIZE) {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import fs from 'fs/promises';
|
|
|
9
9
|
import { getConfig, saveConfig } from './utils/config.js';
|
|
10
10
|
import { isValidDirectory, getGitIgnorePatterns, shouldIgnoreFile } from './utils/files.js';
|
|
11
11
|
const BACKEND_URL = process.env.OPTIQ_BACKEND_URL || 'https://api.optiqcode.com';
|
|
12
|
-
const ENGINE_URL = process.env.OPTIQ_ENGINE_URL || '
|
|
12
|
+
const ENGINE_URL = process.env.OPTIQ_ENGINE_URL || 'http://25.36.113.3:3002';
|
|
13
13
|
// Debug mode - set OPTIQ_DEBUG=1 to see request details
|
|
14
14
|
const DEBUG = process.env.OPTIQ_DEBUG === '1';
|
|
15
15
|
// Helper to generate repository ID from path
|
|
@@ -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.5.0\n'));
|
|
36
36
|
}
|
|
37
37
|
function showHelp() {
|
|
38
38
|
console.log(chalk.cyan.bold('Optiq CLI') + chalk.gray(' - AI-powered code indexing\n'));
|
|
@@ -298,8 +298,8 @@ async function indexOnce(targetPath, config) {
|
|
|
298
298
|
}
|
|
299
299
|
// Generate repository ID from path
|
|
300
300
|
const repoId = generateRepoId(targetPath);
|
|
301
|
-
// Upload in small batches to avoid
|
|
302
|
-
const BATCH_SIZE =
|
|
301
|
+
// Upload in small batches to avoid gateway timeouts
|
|
302
|
+
const BATCH_SIZE = 5;
|
|
303
303
|
let totalChunks = 0;
|
|
304
304
|
if (DEBUG) {
|
|
305
305
|
console.log(chalk.gray(`\n[DEBUG] Sending to: ${ENGINE_URL}/api/v1/index`));
|
|
@@ -401,8 +401,8 @@ async function watchDirectory(targetPath, config) {
|
|
|
401
401
|
}
|
|
402
402
|
spinner.text = `Reading... ${Math.min(i + PARALLEL_READS, files.length)}/${files.length}`;
|
|
403
403
|
}
|
|
404
|
-
// Upload in small batches to avoid
|
|
405
|
-
const BATCH_SIZE =
|
|
404
|
+
// Upload in small batches to avoid gateway timeouts
|
|
405
|
+
const BATCH_SIZE = 50;
|
|
406
406
|
for (let i = 0; i < filesArray.length; i += BATCH_SIZE) {
|
|
407
407
|
const batch = filesArray.slice(i, i + BATCH_SIZE);
|
|
408
408
|
const batchNum = Math.floor(i / BATCH_SIZE) + 1;
|