magector 2.16.11 → 2.16.13
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/package.json +5 -5
- package/src/mcp-server.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magector",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.13",
|
|
4
4
|
"description": "Semantic code search for Magento 2 — index, search, MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/mcp-server.js",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"ruvector": "^0.1.96"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@magector/cli-darwin-arm64": "2.16.
|
|
37
|
-
"@magector/cli-linux-x64": "2.16.
|
|
38
|
-
"@magector/cli-linux-arm64": "2.16.
|
|
39
|
-
"@magector/cli-win32-x64": "2.16.
|
|
36
|
+
"@magector/cli-darwin-arm64": "2.16.13",
|
|
37
|
+
"@magector/cli-linux-x64": "2.16.13",
|
|
38
|
+
"@magector/cli-linux-arm64": "2.16.13",
|
|
39
|
+
"@magector/cli-win32-x64": "2.16.13"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
42
42
|
"magento",
|
package/src/mcp-server.js
CHANGED
|
@@ -492,26 +492,6 @@ let reindexTotalFiles = 0;
|
|
|
492
492
|
let reindexItemsToEmbed = 0;
|
|
493
493
|
let reindexPhase2Start = null;
|
|
494
494
|
|
|
495
|
-
/**
|
|
496
|
-
* Build a short reindex progress message for tool responses.
|
|
497
|
-
* Returns null when not reindexing.
|
|
498
|
-
*/
|
|
499
|
-
function getReindexWarning() {
|
|
500
|
-
if (!reindexInProgress) return null;
|
|
501
|
-
const phases = ['initializing', 'AST analysis', 'embedding generation', 'building HNSW graph'];
|
|
502
|
-
const phase = phases[reindexPhase] || 'in progress';
|
|
503
|
-
const elapsed = reindexStartTime ? Math.round((Date.now() - reindexStartTime) / 1000) : 0;
|
|
504
|
-
let msg = `⚠️ Re-indexing ${phase}`;
|
|
505
|
-
if (elapsed > 0) msg += ` (${elapsed}s elapsed)`;
|
|
506
|
-
if (reindexPhase === 2 && reindexPhase2Start && reindexItemsToEmbed > 0) {
|
|
507
|
-
const p2elapsed = (Date.now() - reindexPhase2Start) / 1000;
|
|
508
|
-
const rate = p2elapsed > 0 ? Math.round(reindexItemsToEmbed * (p2elapsed / reindexItemsToEmbed)) : 0;
|
|
509
|
-
if (rate > 0) msg += ` — ETA ~${Math.round((reindexItemsToEmbed / (p2elapsed > 0 ? reindexItemsToEmbed / p2elapsed : 1)) * (1 - p2elapsed / rate))}s`;
|
|
510
|
-
}
|
|
511
|
-
msg += '. Results may be from previous index or incomplete.';
|
|
512
|
-
return msg;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
495
|
/**
|
|
516
496
|
* Check if the database file is compatible with the current binary.
|
|
517
497
|
* Uses a cached result to avoid running stats (30-60s) on every startup.
|