@vohongtho.infotech/code-intel 1.0.0 → 1.0.2
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 +28 -4
- package/dist/cli/hook.js +348 -0
- package/dist/cli/hook.js.map +1 -0
- package/dist/cli/main.js +1921 -369
- package/dist/cli/main.js.map +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/index.js +862 -569
- package/dist/index.js.map +1 -1
- package/dist/web/assets/{es-DIfCC5I3.js → es-DiINqj58.js} +1 -1
- package/dist/web/assets/index-CzWucUxe.js +354 -0
- package/dist/web/assets/index-D3zJQH9-.css +2 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -2
- package/dist/web/assets/index-QSOOiRQm.js +0 -352
- package/dist/web/assets/index-XjZQJMiV.css +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -202,9 +202,20 @@ declare function detectOverrides(graph: KnowledgeGraph): CodeEdge[];
|
|
|
202
202
|
|
|
203
203
|
interface LLMConfig {
|
|
204
204
|
/** Which provider to use. Default: 'ollama'. */
|
|
205
|
-
provider?: 'openai' | 'anthropic' | 'ollama';
|
|
205
|
+
provider?: 'openai' | 'anthropic' | 'ollama' | 'custom';
|
|
206
206
|
/** Model name / ID passed to the provider. Each provider has its own default. */
|
|
207
207
|
model?: string;
|
|
208
|
+
/**
|
|
209
|
+
* For 'custom' provider: the base URL of the OpenAI-compatible API.
|
|
210
|
+
* e.g. 'http://localhost:1234/v1' (LM Studio), 'https://api.groq.com/openai/v1', etc.
|
|
211
|
+
*/
|
|
212
|
+
baseUrl?: string;
|
|
213
|
+
/**
|
|
214
|
+
* API key / token for the provider.
|
|
215
|
+
* For 'custom': passed as Bearer token. For 'openai': falls back to $OPENAI_API_KEY.
|
|
216
|
+
* For 'ollama': not needed.
|
|
217
|
+
*/
|
|
218
|
+
apiKey?: string;
|
|
208
219
|
/** Max concurrent LLM calls per batch. Default: 20. */
|
|
209
220
|
batchSize?: number;
|
|
210
221
|
/**
|
|
@@ -369,8 +380,13 @@ declare class Bm25Index {
|
|
|
369
380
|
*/
|
|
370
381
|
load(): void;
|
|
371
382
|
/**
|
|
372
|
-
* BM25 search.
|
|
373
|
-
*
|
|
383
|
+
* BM25 search.
|
|
384
|
+
*
|
|
385
|
+
* Performance strategy:
|
|
386
|
+
* 1. Skip ultra-high-df terms (df/N > 0.6) — near-zero IDF, dominate posting
|
|
387
|
+
* lists for common words like "function", "return", "export" in large repos.
|
|
388
|
+
* 2. Min-heap top-K selection — O(n log k) instead of full O(n log n) sort.
|
|
389
|
+
* For k=10 and n=30,000 candidates this is ~10× faster than Array.sort.
|
|
374
390
|
*/
|
|
375
391
|
search(query: string, limit: number): SearchResult[];
|
|
376
392
|
/**
|