code-graph-context 2.12.4 → 2.12.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/README.md
CHANGED
|
@@ -190,6 +190,7 @@ If you prefer to edit the config files directly:
|
|
|
190
190
|
| `NEO4J_USER` | No | `neo4j` | Neo4j username |
|
|
191
191
|
| `NEO4J_PASSWORD` | No | `PASSWORD` | Neo4j password |
|
|
192
192
|
| `EMBEDDING_MODEL` | No | `codesage/codesage-base-v2` | Local embedding model (see [Embedding Configuration](#embedding-configuration)) |
|
|
193
|
+
| `EMBEDDING_BATCH_SIZE` | No | `16` | Texts per embedding batch (lower = less memory, higher = faster) |
|
|
193
194
|
| `EMBEDDING_SIDECAR_PORT` | No | `8787` | Port for local embedding server |
|
|
194
195
|
| `EMBEDDING_DEVICE` | No | auto (`mps`/`cpu`) | Device for embeddings. Auto-detects MPS on Apple Silicon |
|
|
195
196
|
| `EMBEDDING_HALF_PRECISION` | No | `false` | Set `true` for float16 (uses ~0.5x memory) |
|
|
@@ -432,7 +432,6 @@ export const CORE_TYPESCRIPT_SCHEMA = {
|
|
|
432
432
|
labels: ['Enum', 'TypeScript'],
|
|
433
433
|
primaryLabel: 'Enum',
|
|
434
434
|
indexed: ['name', 'isExported'],
|
|
435
|
-
skipEmbedding: true,
|
|
436
435
|
},
|
|
437
436
|
},
|
|
438
437
|
[CoreNodeType.FUNCTION_DECLARATION]: {
|
|
@@ -493,7 +492,6 @@ export const CORE_TYPESCRIPT_SCHEMA = {
|
|
|
493
492
|
labels: ['Variable', 'TypeScript'],
|
|
494
493
|
primaryLabel: 'Variable',
|
|
495
494
|
indexed: ['name'],
|
|
496
|
-
skipEmbedding: true,
|
|
497
495
|
},
|
|
498
496
|
},
|
|
499
497
|
[CoreNodeType.TYPE_ALIAS]: {
|
|
@@ -514,7 +512,6 @@ export const CORE_TYPESCRIPT_SCHEMA = {
|
|
|
514
512
|
labels: ['TypeAlias', 'TypeScript'],
|
|
515
513
|
primaryLabel: 'TypeAlias',
|
|
516
514
|
indexed: ['name'],
|
|
517
|
-
skipEmbedding: true,
|
|
518
515
|
},
|
|
519
516
|
},
|
|
520
517
|
[CoreNodeType.CONSTRUCTOR_DECLARATION]: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Local Embeddings Service
|
|
3
|
-
* Uses a Python sidecar running
|
|
3
|
+
* Uses a Python sidecar running CodeSage-Base-v2 (or configurable model).
|
|
4
4
|
* Default provider — no API key required.
|
|
5
5
|
*/
|
|
6
6
|
import { debugLog } from '../../mcp/utils.js';
|
|
7
7
|
import { getEmbeddingSidecar } from './embedding-sidecar.js';
|
|
8
8
|
const BATCH_CONFIG = {
|
|
9
|
-
maxBatchSize:
|
|
9
|
+
maxBatchSize: parseInt(process.env.EMBEDDING_BATCH_SIZE ?? '', 10) || 16,
|
|
10
10
|
};
|
|
11
11
|
export class LocalEmbeddingsService {
|
|
12
12
|
async embedText(text) {
|
package/package.json
CHANGED